diff options
author | Filipp Lepalaan <filipp@mac.com> | 2011-07-14 00:30:05 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2011-07-14 00:30:05 +0300 |
commit | 84b13d3d2642ad79369b33772c31c3e51d46d36f (patch) | |
tree | da76d831a24112660da083dca8e6620bb8fca3eb /MainDb.php | |
parent | 721154b01441db5fefaf62e9f2ea2c990a4a0d37 (diff) | |
download | main-84b13d3d2642ad79369b33772c31c3e51d46d36f.tar.gz main-84b13d3d2642ad79369b33772c31c3e51d46d36f.tar.bz2 main-84b13d3d2642ad79369b33772c31c3e51d46d36f.zip |
Added MainDb::one()
Diffstat (limited to 'MainDb.php')
-rw-r--r-- | MainDb.php | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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 |