aboutsummaryrefslogtreecommitdiffstats
path: root/MainDb.php
diff options
context:
space:
mode:
Diffstat (limited to 'MainDb.php')
-rw-r--r--MainDb.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/MainDb.php b/MainDb.php
index e1f293b..1f9401a 100644
--- a/MainDb.php
+++ b/MainDb.php
@@ -62,6 +62,12 @@ class MainDb
trigger_error('Cloning disabled', E_USER_ERROR);
}
+ public function one($sql, $data = NULL)
+ {
+ $result = self::fetch($sql, $data);
+ return current($result);
+ }
+
////
// execute an SQL query
// @return mixed