什么是php 5中的替代函数mysql_list_tables() [英] what is the alternate function mysql_list_tables() in php 5

查看:202
本文介绍了什么是php 5中的替代函数mysql_list_tables()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面是我使用的代码,除了

below is the code i used everything works well EXCEPT for

已弃用:第28行的E:\ xampp \ htdocs \ federalcreditadvocates \ admin_page \ view_reports.php中已弃用函数mysql_list_tables()

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(),或者是否有针对该版本的新功能..请告诉我,我真的很需要它,谢谢:)

it's depricated.. so what i need is simple mysql_list_tables() for php version 5 or if there is a new function for this one.. please tell me i really need it thanks :)

<?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

http://www.jaywebtechnologies.co.cc <-- down for now sooner it'l be http://www.jaywebtechnologies.com

推荐答案

直接查询information_schema数据库:

query the information_schema DB directly:

select TABLE_NAME
from INFORMATION_SCHEMA
where TABLE_SCHEMA='yourdbnamehere'

这篇关于什么是php 5中的替代函数mysql_list_tables()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆