Close

MySQL: Get the next Auto increment id of a table

[code language=”php”]
$result = mysql_query("SHOW TABLE STATUS LIKE ‘".$table_name."’ ");
$row = mysql_fetch_array($result);
$next_id = $row[‘Auto_increment’];
[/code]