From 08cba850d34f1e3692ec2aa9ff051fdeabe47b7f Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Tue, 13 Oct 2009 10:42:01 +0300 Subject: Some more fixes --- Db.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Db.php') 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); + } } -- cgit v1.2.3