/* We are starting disconnected */
$this->setConnStatus(false);
- /* Connect to MySQL Database */
+ /* Connect to database */
$this->db_connect();
} // __construct()
$this->setConnStatus(false);
}
else {
+ sqlite3_create_function($this->db, 'basename', 1, 'basename');
$this->setConnStatus(true);
}
break;
$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;
} // 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
*