X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=phpfspot.git;a=blobdiff_plain;f=phpfspot_db.php;h=807cf0feb36ca072307497ba4d920208b4b27b3c;hp=7d8caa09f0a040ba770714c36e8adf81a7e108e7;hb=642996d363598ad9b919f261e39c04f25ebabeb1;hpb=e4cfdbe7da6340d8c06f797eba686797391717c6 diff --git a/phpfspot_db.php b/phpfspot_db.php index 7d8caa0..807cf0f 100644 --- a/phpfspot_db.php +++ b/phpfspot_db.php @@ -43,7 +43,7 @@ class PHPFSPOT_DB { /* We are starting disconnected */ $this->setConnStatus(false); - /* Connect to MySQL Database */ + /* Connect to database */ $this->db_connect(); } // __construct() @@ -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; @@ -234,19 +235,6 @@ class PHPFSPOT_DB { } // db_getNumRows() - /** - * PHPFSPOT_DB get primary key - * - * This function returns the primary key of the last - * operated insert SQL query. - */ - public function db_getid() - { - /* Get the last primary key ID from execute query */ - return mysql_insert_id($this->db->connection); - - } // db_getid() - /** * PHPFSPOT_DB check table exists *