mirror of
https://github.com/friendica/friendica
synced 2025-04-27 09:50:12 +00:00
We now support PDO for database connections as well
This commit is contained in:
parent
9cbab5cd7a
commit
07516c318c
2 changed files with 205 additions and 125 deletions
|
@ -11,14 +11,11 @@ define("IMPORT_DEBUG", False);
|
|||
|
||||
function last_insert_id() {
|
||||
global $db;
|
||||
|
||||
if (IMPORT_DEBUG)
|
||||
return 1;
|
||||
if ($db->mysqli) {
|
||||
$thedb = $db->getdb();
|
||||
return $thedb->insert_id;
|
||||
} else {
|
||||
return mysql_insert_id();
|
||||
}
|
||||
|
||||
return $db->insert_id();
|
||||
}
|
||||
|
||||
function last_error() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue