I've never had to find a list of MySQL database names before using PHP. I see that there is a mysql_list_dbs() function, but I see no equivalent using mysqli. Haven't found any info using google.
How can I grab a list of database names using mysqli? Is there a function or some sort of query I can run?
Thanks in advance!
mysqli list database names
Moderator: General Moderators
Re: mysqli list database names
SHOW DATABASES() is a query you can run. 5 minutes of searching the docs & Googling didn't show me any other way to do it.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: mysqli list database names
Works perfectly. Thanks pickle.