PDA

View Full Version : Syntax for inserting and recieving id back


kobescoresagain
02-23-2007, 11:08 AM
What is the syntax for inserting into a table and immediately receiving back the id for that row in vbulletin? An example of how it works would suffice as well.

Thanks in advance.

Princeton
02-23-2007, 11:34 AM
$db->query_write("
INSERT INTO " . TABLE_PREFIX . "yourtable
(fields)
VALUES
(yourvalues)
");
$returnedid = $db->insert_id();