summaryrefslogtreecommitdiffstats
path: root/lib/db.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/db.php')
-rw-r--r--lib/db.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/db.php b/lib/db.php
index fa3995be125..78a4da10ce8 100644
--- a/lib/db.php
+++ b/lib/db.php
@@ -28,7 +28,7 @@ class OC_DB {
const BACKEND_PDO=0;
const BACKEND_MDB2=1;
- static private $connection; //the prefered conenction to use, either PDO or MDB2
+ static private $connection; //the prefered connection to use, either PDO or MDB2
static private $backend=null;
static private $MDB2=false;
static private $PDO=false;
@@ -480,4 +480,13 @@ class PDOStatementWrapper{
public function __call($name,$arguments){
return call_user_func_array(array($this->statement,$name),$arguments);
}
+
+ /**
+ * Provide a simple fetchOne.
+ * fetch single column from the next row
+ * @param int $colnum the column number to fetch
+ */
+ public function fetchOne($colnum = 0){
+ return $this->statement->fetchColumn($colnum);
+ }
}