Insert_ID -> lastInsertId
This commit is contained in:
parent
d90016b932
commit
ffb1762280
@ -451,7 +451,7 @@ class CommentList extends SimpleExtension {
|
||||
"INSERT INTO comments(image_id, owner_id, owner_ip, posted, comment) ".
|
||||
"VALUES(?, ?, ?, now(), ?)",
|
||||
array($image_id, $user->id, $_SERVER['REMOTE_ADDR'], $comment));
|
||||
$cid = $database->db->Insert_ID();
|
||||
$cid = $database->db->lastInsertId();
|
||||
log_info("comment", "Comment #$cid added to Image #$image_id");
|
||||
}
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ class ImageIO extends SimpleExtension {
|
||||
$image->id = $database->db->GetOne("SELECT id FROM images WHERE hash=?", array($image->hash));
|
||||
}
|
||||
else {
|
||||
$image->id = $database->db->Insert_ID();
|
||||
$image->id = $database->db->lastInsertId();
|
||||
}
|
||||
|
||||
log_info("image", "Uploaded Image #{$image->id} ({$image->hash})");
|
||||
|
@ -304,7 +304,7 @@ class UserPage extends SimpleExtension {
|
||||
$database->Execute(
|
||||
"INSERT INTO users (name, pass, joindate, email, admin) VALUES (?, ?, now(), ?, ?)",
|
||||
array($event->username, $hash, $email, $admin));
|
||||
$uid = $database->db->Insert_ID();
|
||||
$uid = $database->db->lastInsertId();
|
||||
log_info("user", "Created User #$uid ({$event->username})");
|
||||
}
|
||||
|
||||
|
@ -323,7 +323,7 @@ function insert_defaults($dsn) { // {{{
|
||||
$user_insert = $db->Prepare("INSERT INTO users(name, pass, joindate, admin) VALUES(?, ?, now(), ?)");
|
||||
|
||||
$db->Execute($user_insert, Array('Anonymous', null, 'N'));
|
||||
$db->Execute($config_insert, Array('anon_id', $db->Insert_ID()));
|
||||
$db->Execute($config_insert, Array('anon_id', $db->lastInsertId()));
|
||||
|
||||
if(check_im_version() > 0) {
|
||||
$db->Execute($config_insert, Array('thumb_engine', 'convert'));
|
||||
|
Loading…
x
Reference in New Issue
Block a user