Good morning.
I was wondering if there is a PHP way to specify all available databases using mysqli . The following works smoothly in mysql (see php docs ):
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); $db_list = mysql_list_dbs($link); while ($row = mysql_fetch_object($db_list)) { echo $row->Database . "\n"; }
Is it possible to change:
$db_list = mysql_list_dbs($link);
into something like:
$db_list = mysqli_list_dbs($link);
If this does not work, would it be possible to convert the created mysqli connection to regular mysql and continue fetching / querying on the new converted connection?
php mysqli
user448038
source share