数据库中的表总数返回1

时间:2015-06-06 15:51:57

标签: mysql

每个人都建议使用let menuItemYes = UIMenuItem(title: "✅", action: "doSomething")

如果我执行以下操作,我总是得到' 1'返回:

SELECT COUNT(*) FROM information_schema.tables

1 个答案:

答案 0 :(得分:0)

执行以下操作:

$res=mysql_query("SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = 'usr_web275'");

//Check if any row is returned or not.
if (!$res) {    
    echo "No data found";
}

else
{
    $row = mysql_fetch_assoc($res);  //Returns the row of the result
    $number_of_tables_in_database = $row["count(*)"];
    echo $number_of_tables_in_database;
}
相关问题