aboutsummaryrefslogtreecommitdiffstats
path: root/Db.php
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mekanisti.fi>2009-10-13 10:42:01 +0300
committerFilipp Lepalaan <filipp@mekanisti.fi>2009-10-13 10:42:01 +0300
commit08cba850d34f1e3692ec2aa9ff051fdeabe47b7f (patch)
treebfc77312d1071d2785359e3a8a6067c377668319 /Db.php
parentb9d2b8467dd4046512b86e0f63feefb6b06c2789 (diff)
downloadmain-08cba850d34f1e3692ec2aa9ff051fdeabe47b7f.tar.gz
main-08cba850d34f1e3692ec2aa9ff051fdeabe47b7f.tar.bz2
main-08cba850d34f1e3692ec2aa9ff051fdeabe47b7f.zip
Some more fixes
Diffstat (limited to 'Db.php')
-rw-r--r--Db.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/Db.php b/Db.php
index 7d85d0d..2ce5ff0 100644
--- a/Db.php
+++ b/Db.php
@@ -52,6 +52,7 @@ class Db
/**
* Execute an SQL query
+ * @return mixed
*/
public function query($sql, $data = null)
{
@@ -92,6 +93,12 @@ class Db
return $data;
}
+
+ public function fetch($sql, $data = null)
+ {
+ $stmt = DB::query($sql, $data);
+ return $stmt->fetchAll(PDO::FETCH_ASSOC);
+ }
}