X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=blobdiff_plain;f=phpfspot_db.php;h=807cf0feb36ca072307497ba4d920208b4b27b3c;hp=4e87cf9c87927978eb2ed671d7554cc5e2fe5458;hb=a65027a61ac189bc723710454401f95f1dba6b21;hpb=af140085fe603c00c7ce98435b89d2ee56a10cd9;ds=sidebyside diff --git a/phpfspot_db.php b/phpfspot_db.php index 4e87cf9..807cf0f 100644 --- a/phpfspot_db.php +++ b/phpfspot_db.php @@ -73,6 +73,7 @@ class PHPFSPOT_DB { $this->setConnStatus(false); } else { + sqlite3_create_function($this->db, 'basename', 1, 'basename'); $this->setConnStatus(true); } break; @@ -202,10 +203,10 @@ class PHPFSPOT_DB { $result = $this->db_query($query); switch($this->parent->cfg->db_access) { case 'native': - $row = $result->fetchRow(); + $row = $this->db_fetch_object($result); break; case 'pdo': - $row = $result[0]; + $row = $result->fetch(); break; } return $row;