diff options
Diffstat (limited to 'Db.php')
-rw-r--r-- | Db.php | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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); + } } |