From 84b13d3d2642ad79369b33772c31c3e51d46d36f Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Thu, 14 Jul 2011 00:30:05 +0300 Subject: Added MainDb::one() --- MainDb.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'MainDb.php') 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 -- cgit v1.2.3