I'm trying to migrate from drupal_write_record() to db_insert() / db_update(), but db_insert() returns a weird key instead of the last inserted key.
On an empty table, I'm doing an insert, and instead of real row number (suppose to be 1, right?), I'm getting a wrong one.
$fields['created'] = REQUEST_TIME; $fields['uid'] = 1; $insert = db_insert('table')->fields($fields); $last_insert_id = $insert->execute(); // suppose to be 1, but = 43587087
Any ideas? Thanx.