diff options
Diffstat (limited to 'Controller.php')
-rw-r--r-- | Controller.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Controller.php b/Controller.php index 432ae93..22dccc6 100644 --- a/Controller.php +++ b/Controller.php @@ -35,6 +35,11 @@ class Controller return $this->find(array('id' => $id)); } + public function db() + { + return Db::getInstance(); + } + /** * The New Find */ @@ -107,7 +112,7 @@ class Controller $sql .= " LIMIT $limit"; } - $result = DB::fetch($sql, $values); + $result = Db::fetch($sql, $values); for ($i=0; $i < count($result); $i++) { @@ -283,7 +288,7 @@ class Controller $sql = "UPDATE `{$this->table}` SET $query WHERE `$col` = :$col"; - return DB::query($sql, $values); + return Db::query($sql, $values); } |