Forum Moderators: open

Message Too Old, No Replies

Viewing all available databases

PHP/Mysql

         

slimcharlie

8:26 pm on Nov 30, 2004 (gmt 0)

10+ Year Member



Hi all, I am working on a PHP application that writes to many and different mysql dbs. I need users to be able to select which db to work on.

Is there any way (query) to display all the available db for the user to select one from a drop down or something?

I've been trying with:
Select * from master..sysdatabases with no luck.

Thanks for your help.

mark_roach

8:27 pm on Nov 30, 2004 (gmt 0)

10+ Year Member



I think show databases does the trick.

slimcharlie

11:07 pm on Nov 30, 2004 (gmt 0)

10+ Year Member



Could you be a little bit more specific?

Would it be something like
<?php
show databases
?>
?