List out all the mysql database name using follwing php code.
<?php
error_reporting(E_ALL);
$connection = mysql_connect('localhost', 'root', '');
$database_list = mysql_list_dbs($connection);
$count = mysql_num_rows($database_list);
for($i=0;$i<$count;$i++) {
echo mysql_db_name($db_list, $i) . "<br/>";
}
?>
<?php
error_reporting(E_ALL);
$connection = mysql_connect('localhost', 'root', '');
$database_list = mysql_list_dbs($connection);
$count = mysql_num_rows($database_list);
for($i=0;$i<$count;$i++) {
echo mysql_db_name($db_list, $i) . "<br/>";
}
?>
0 comments:
Post a Comment