aboutsummaryrefslogtreecommitdiffstats
path: root/Controller.php
diff options
context:
space:
mode:
Diffstat (limited to 'Controller.php')
-rw-r--r--Controller.php9
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);
}