B
ben
Guest
I know that there is a php code that finds how many rows there are in a table....an example is below..
<?php
$link = mysql_connect("localhost", "mysql_user", "mysql_password");
mysql_select_db("database", $link);
$result = mysql_query("SELECT * FROM table1", $link);
$num_rows = mysql_num_rows($result);
echo "$num_rows Rows\n";
?>
IS THERE A WAY TO FIGURE OUT HOW MANY DATABASES THERE ARE? Like, lets say I tell it to connect to "localhost" and I want it to tell me how many databases there are. Is there such a command?
Thank you!
<?php
$link = mysql_connect("localhost", "mysql_user", "mysql_password");
mysql_select_db("database", $link);
$result = mysql_query("SELECT * FROM table1", $link);
$num_rows = mysql_num_rows($result);
echo "$num_rows Rows\n";
?>
IS THERE A WAY TO FIGURE OUT HOW MANY DATABASES THERE ARE? Like, lets say I tell it to connect to "localhost" and I want it to tell me how many databases there are. Is there such a command?
Thank you!