check is a database exists?
am 18.11.2006 03:23:42 von laredotornadoHi, Using MySQL 5.0 and PHP 4.4.4, what is the easiest way (using PHP
code) to check if a database by a particular name exists?
Thanks, - Dave
Hi, Using MySQL 5.0 and PHP 4.4.4, what is the easiest way (using PHP
code) to check if a database by a particular name exists?
Thanks, - Dave
laredotornado@zipmail.com wrote:
>
> Using MySQL 5.0 and PHP 4.4.4, what is the easiest way (using PHP
> code) to check if a database by a particular name exists?
Get a list of existing databases using mysql_list_dbs() and see if the
name you are interested in is on the list:
http://www.php.net/manual/en/function.mysql-list-dbs.php
Cheers,
NC