Tuesday, April 27, 2010

Last insert id in drupal

db_last_insert_id($table, $field);

where

$table The name of the table you inserted into.

$field The name of the autoincrement field.