aboutsummaryrefslogtreecommitdiffstats
path: root/Db.php
diff options
context:
space:
mode:
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);
+ }
}