Jump to content

SQL - show databases and count tables


gaza165

Recommended Posts

Hi can someone steer me in the right direction

 

I would like to know how to display my databases and count how many tables are in each and display them..

 

this is what i have.

 

<?php
include("./includes/dbconnect.php");

$sql = mysql_query("show databases");


while($row = mysql_fetch_array($sql)) {

echo $row['Database'];

}
?>

 

 

i want something like

 

information_schema(3)

cdcol(4)

mysql(2)

phpmyadmin(7)

test

webauth

Link to comment
https://forums.phpfreaks.com/topic/159102-sql-show-databases-and-count-tables/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.