如何在php中从show table schema查询中显示数组

e5nszbig  于 2021-06-25  发布在  Mysql
关注(0)|答案(1)|浏览(349)

我有个问题

$qdrop=mysqli_query($connect,"select TABLE_NAME,create_time
      FROM INFORMATION_SCHEMA.TABLES 
      WHERE table_schema = 'purbalingga' 
      AND CREATE_TIME <='2016-10-07' and TABLE_NAME LIKE '2016%'");

还有一段时间来展示阵列

while ($datadrop=mysqli_fetch_array($qdrop)) {
      echo $qdrop['TABLE_NAME'];echo"<br/>";
       }

但我有个错误:

Fatal error: Cannot use object of type mysqli_result as array in E:\xampp\htdocs
t3psigkw

t3psigkw1#

替换:

while ($datadrop=mysqli_fetch_array($qdrop)) {
  echo $qdrop['TABLE_NAME'];
  echo"<br/>";
}

使用:

while ($datadrop=mysqli_fetch_array($qdrop)) {
  echo $datadrop['TABLE_NAME'];
  echo"<br/>";
}
``` `$qdrop` 只保留查询,但 `$datadrop` 是拿着枪的那个吗 `result in array` .

相关问题