Home ›
Don't try to use last insert ID to get the just-submitted userDon't try to use last insert ID to get the just-submitted user
Submitted by Benjamin Melançon on October 9, 2008 - 8:26pm
<?php
// this does not work-- it grabs the ID of the last log message!!
$uid = db_result(db_query('SELECT LAST_INSERT_ID()'));
drupal_set_message('uid: '. $uid);
?>
Comments
Post new comment