Two way are there in mysql
1st way :
SELECT Auto_increment FROM information_schema.tables WHERE table_name='%s';"
2nd way using this sql :
$rs = mysql_query("SHOW TABLE STATUS LIKE 'table_name' ");
$row = mysql_fetch_array($rs);
echo $row['Auto_increment'];
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment