function sequence_reset in Devel 5
Set sequences table to a sane state. Useful after a bulk import.
Return value
void
File
- ./
devel.module, line 1502
Code
function sequence_reset($table, $column) {
$max = db_result(db_query("SELECT MAX({$column}) FROM {$table}"));
$max = $max ? $max + 1 : 2;
db_query("UPDATE {sequences} SET id = {$max} WHERE name='{$table}_{$column}'");
}