Show all tables inside a MySQL database using PHP?

前端 未结 5 1110
孤城傲影
孤城傲影 2021-01-31 08:32

I\'m trying to show all the tables in my database. I\'ve tried this:

$sql = \"SHOW TABLES\";
$result = $conn->query($sql);
$tables = $result->fetch_assoc()         


        
5条回答
  •  我在风中等你
    2021-01-31 08:55

    SHOW TABLES only lists the non-TEMPORARY tables in a given database.

    https://dev.mysql.com/doc/refman/5.0/en/show-tables.html

提交回复
热议问题