How to get the Next Auto Increment ID in Mysql

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'];