getDB(), getRootDB()를 autoload 클래스로 변경

- 각각 DB::db(), RootDB::db()임.
This commit is contained in:
2018-03-25 00:07:37 +09:00
parent bb1a496835
commit 9e1aadf486
62 changed files with 258 additions and 269 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ $imageType = $size[2];
$availableImageType = array('.jpg'=>IMAGETYPE_JPEG, '.png'=>IMAGETYPE_PNG, '.gif'=>IMAGETYPE_GIF);
$db = getRootDB();
$db = RootDB::db();
$member = $db->queryFirstRow('SELECT `ID`, `PICTURE` FROM `MEMBER` WHERE `NO` = %i', $session->userID);
@@ -84,7 +84,7 @@ if(!is_uploaded_file($image['tmp_name'])) {
$response['result'] = false;
} else {
$pic = "{$newPicName}?={$rf}";
getRootDB()->update('MEMBER',[
RootDB::db()->update('MEMBER',[
'PICTURE' => $pic,
'IMGSVR' => 1
], 'NO=%i', $session->userID);