| Versionen | |
|---|---|
| drupal6 – drupal7 | db_last_insert_id($table, $field) |
Returns the last insert id.
$table The name of the table you inserted into.
$field The name of the autoincrement field.
includes/
<?php
function db_last_insert_id($table, $field) {
return db_result(db_query('SELECT LAST_INSERT_ID()'));
}
?>
Kommentare
Kommentar hinzufügen