下面是我使用的代码,除了
Deprecated: Function mysql_list_tables() is deprecated in E:\xampp\htdocs\federalcreditadvocates\admin_page\view_reports.php on line 28
它已经过时了..所以我需要的是用于 php 版本 5 的简单 mysql_list_tables() 或者如果这个函数有新功能..请告诉我我真的需要它谢谢 :)
<?php
$table_query = mysql_list_tables("odesk_carlo");
$get_num_rows = mysql_num_rows($table_query);
for ($table = 0; $table < $get_num_rows; $table++)
{
echo "Table name: ", mysql_tablename($result, $table), "<br />";
}
?>
http://www.jaywebtechnologies.co.cc <-- 马上下来 http://www.jaywebtechnologies.com
最佳答案
直接查询 information_schema 数据库:
select TABLE_NAME
from INFORMATION_SCHEMA
where TABLE_SCHEMA='yourdbnamehere'
关于php - php 5 中的备用函数 mysql_list_tables() 是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13382571/