From c217e77f2540085922b4483c99670eca06923799 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Mon, 26 Oct 2009 15:41:40 +0200 Subject: Bug fixes --- Controller.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Controller.php') diff --git a/Controller.php b/Controller.php index 8f8bbd8..6ab61df 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::query($sql, $values)->fetchAll(PDO::FETCH_ASSOC); + $result = Db::fetch($sql, $values); for ($i=0; $i < count($result); $i++) { @@ -292,7 +297,7 @@ class Controller $sql = "UPDATE `{$this->table}` SET $query WHERE `$col` = :$col"; - return DB::query($sql, $values); + return Db::query($sql, $values); } -- cgit v1.2.3