Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit cb4377e

Browse files
update: Fixed minor bugs
1 parent 700657c commit cb4377e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

‎db.class.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
* 2021年03月12日 -> Added a lot of comments
88
* 2021年06月05日 -> Added transformWith private method for insert and update methods using the $additional array. Added formatMonney public method to work with monetary values. Changed getPageNow to getCurrentPage. Added search method.
99
* 2021年08月17日 -> Made a few improvements within base core functions
10-
* 2021年11月16日 -> Fixed Fetch method when same SQL is called more than once
1110
*/
1211

1312
class db
@@ -138,9 +137,9 @@ private static function encapsulate($mixed)
138137
$instance = new dbObject(self::getInstance()->query($mixed), array("key" => $key));
139138
self::$object[$key] = $instance;
140139
}
141-
if (self::$object[$key]->extra["rows"] + 1 == self::$object[$key]->extra["totalEntries"] && self::$object[$key]->extra["totalEntries"] !== 0) {
140+
if (self::$object[$key]->extra["rows"] === self::$object[$key]->extra["totalEntries"]) {
142141
unset(self::$object[$key]);
143-
return self::encapsulate($mixed);
142+
return false;
144143
}
145144
return self::$object[$key];
146145
}
@@ -163,8 +162,7 @@ public static function fetch($mixed, $simple = false)
163162
}
164163
}
165164
$mixed = self::encapsulate($mixed);
166-
return $mixed->getData();
167-
//return ($mixed ? $mixed->getData() : $mixed);
165+
return ($mixed ? $mixed->getData() : $mixed);
168166
}
169167
if ($mixed instanceof dbObject) {
170168
return $mixed->getData();

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /