diff --git a/src/index.php b/src/index.php index 5e7bc19..66a0416 100644 --- a/src/index.php +++ b/src/index.php @@ -26,7 +26,7 @@ if($_SESSION['type'] !== 'super') { $db->where("id_owner", $_SESSION['user_id']); $db->orWhere ("id_owner", NULL, 'IS'); } -$numScan = $db->getOne(DATABASE_PREFIX."dynamic_qrcodes", "sum(scan) as numScan"); +$numScan = $db->getOne("dynamic_qrcodes", "sum(scan) as numScan"); /* CREATED CHART */ //I initialize the variables that will contain the daily values to 0 otherwise in the foreach loop they will be reset every time diff --git a/src/lib/Users/Users.php b/src/lib/Users/Users.php index e81610d..0851906 100644 --- a/src/lib/Users/Users.php +++ b/src/lib/Users/Users.php @@ -40,7 +40,7 @@ class Users $db = getDbInstance(); $db->where('id', $id); - $result = $db->getOne(DATABASE_PREFIX.'users'); + $result = $db->getOne('users'); if($result !== NULL) return $result; diff --git a/src/read.php b/src/read.php index 27bef52..2a99ee5 100644 --- a/src/read.php +++ b/src/read.php @@ -7,7 +7,7 @@ if($_SERVER["REQUEST_METHOD"] !== "GET" || !isset($_GET['id'])) $db = getDbInstance(); $db->where("identifier", $_GET['id']); -$qrcode = $db->getOne(DATABASE_PREFIX."dynamic_qrcodes"); +$qrcode = $db->getOne("dynamic_qrcodes"); $data = array ( 'scan' => $db->inc(1)