diff options
author | Filipp Lepalaan <filipp@mekanisti.fi> | 2009-10-26 15:41:40 +0200 |
---|---|---|
committer | Filipp Lepalaan <filipp@mekanisti.fi> | 2009-10-26 15:41:40 +0200 |
commit | c217e77f2540085922b4483c99670eca06923799 (patch) | |
tree | 0476b8eb54b666e28905978b8cb3b00a73bd18b0 /Controller.php | |
parent | 1038b52baf3e67c024527eb27f7493d9cbcae438 (diff) | |
download | main-c217e77f2540085922b4483c99670eca06923799.tar.gz main-c217e77f2540085922b4483c99670eca06923799.tar.bz2 main-c217e77f2540085922b4483c99670eca06923799.zip |
Bug fixes
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 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); } |