diff options
author | Brice Maron <brice@bmaron.net> | 2011-10-16 23:03:03 +0200 |
---|---|---|
committer | Brice Maron <brice@bmaron.net> | 2011-10-16 23:03:03 +0200 |
commit | 1f6be857192bce5c6e33765bdebb424f74b3642d (patch) | |
tree | 7056f87c53f4aff81621c12bf898f0a292f6ee85 /lib/db.php | |
parent | b0127e39188f2268dbd74714e5d2f0e1a2b6ce7b (diff) | |
download | nextcloud-server-1f6be857192bce5c6e33765bdebb424f74b3642d.tar.gz nextcloud-server-1f6be857192bce5c6e33765bdebb424f74b3642d.zip |
Fix bookmarks app to work with postgresql.
Rework the bookmark app to manage postgresql.
Add a fetchOne function into the PdoStmtWrapper
Fix a tipo in comments.
Diffstat (limited to 'lib/db.php')
-rw-r--r-- | lib/db.php | 11 |
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); + } } |