Replaced all mysql_insert_id by db_insert_id

This commit is contained in:
Dmitriy Simushev 2011-11-09 20:57:48 +00:00
parent 863f6867c6
commit 720c4472d3
4 changed files with 6 additions and 6 deletions

View File

@ -59,7 +59,7 @@ function next_revision($link)
{
global $mysqlprefix;
perform_query("update ${mysqlprefix}chatrevision set id=LAST_INSERT_ID(id+1)", $link);
$val = mysql_insert_id($link);
$val = db_insert_id($link);
return $val;
}
@ -76,7 +76,7 @@ function post_message_($threadid, $kind, $message, $link, $from = null, $utime =
$utime ? "FROM_UNIXTIME($utime)" : "CURRENT_TIMESTAMP");
perform_query($query, $link);
return mysql_insert_id($link);
return db_insert_id($link);
}
function post_message($threadid, $kind, $message, $from = null, $agentid = null)
@ -600,7 +600,7 @@ function create_thread($groupid, $username, $remoteHost, $referer, $lang, $useri
db_escape_string($userbrowser, $link));
perform_query($query, $link);
$id = mysql_insert_id($link);
$id = db_insert_id($link);
$newthread = thread_by_id_($id, $link);
return $newthread;

View File

@ -149,7 +149,7 @@ function create_operator_($login, $email, $password, $localename, $commonname, $
db_escape_string($email), '');
perform_query($query, $link);
$id = mysql_insert_id($link);
$id = db_insert_id($link);
return select_one_row("select * from ${mysqlprefix}chatoperator where operatorid = $id", $link);
}

View File

@ -51,7 +51,7 @@ function track_visitor_start($entry, $referer, $link)
db_escape_string(track_build_path($referer, '')),
db_escape_string(track_build_details())), $link);
$id = mysql_insert_id($link);
$id = db_insert_id($link);
return $id ? $id : 0;
}

View File

@ -52,7 +52,7 @@ function create_group($name, $descr, $commonname, $commondescr, $email)
db_escape_string($email));
perform_query($query, $link);
$id = mysql_insert_id($link);
$id = db_insert_id($link);
$newdep = select_one_row("select * from ${mysqlprefix}chatgroup where groupid = $id", $link);
close_connection($link);