Mysql函数语句 "SHOW TABLE STATUS",可以获取当前数据库里的所有表的属性等信息
常用sql语句查询方法:
show table status like 'TableName'
带where语句
show table status where Name ='TableName'
实例:
----链接数据库---
$sql="show table status where Name ='acea'"
$query=mysql_query($sql);
$row = mysql_fetch_array($query);
if($acclass==1){
$pid = $row['Auto_increment'];
转自: http://hi.baidu.com/fgqf/blog/item/8ae18a827a9bfc9cf703a6fa.html