Skip to content
This repository was archived by the owner on Sep 2, 2025. It is now read-only.

Commit 2287d98

Browse files
Merge pull request #92 from tranmh/fix_remove_DATABASE_PREFIX_for_getOne
Inconsistency of using DATABASE_PREFIX with getOne()
2 parents 5488ad0 + 3e43b72 commit 2287d98

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
$db->where("id_owner", $_SESSION['user_id']);
2727
$db->orWhere ("id_owner", NULL, 'IS');
2828
}
29-
$numScan = $db->getOne(DATABASE_PREFIX."dynamic_qrcodes", "sum(scan) as numScan");
29+
$numScan = $db->getOne("dynamic_qrcodes", "sum(scan) as numScan");
3030

3131
/* CREATED CHART */
3232
//I initialize the variables that will contain the daily values to 0 otherwise in the foreach loop they will be reset every time

src/lib/Users/Users.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function getUser($id) {
4040
$db = getDbInstance();
4141

4242
$db->where('id', $id);
43-
$result = $db->getOne(DATABASE_PREFIX.'users');
43+
$result = $db->getOne('users');
4444

4545
if($result !== NULL)
4646
return $result;

src/read.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
$db = getDbInstance();
88

99
$db->where("identifier", $_GET['id']);
10-
$qrcode = $db->getOne(DATABASE_PREFIX."dynamic_qrcodes");
10+
$qrcode = $db->getOne("dynamic_qrcodes");
1111

1212
$data = array (
1313
'scan' => $db->inc(1)

0 commit comments

Comments
 (0)