Possibly even easier would be to change the CREATE DB syntax to - CREATE DATABASE /*!32312 IF NOT EXISTS*/ my_database_name
This assumes you don't really care about an error code being returned if it does already exist. Shawn Sellars -----Original Message----- > if ( database doesn't exists ) > create db; As far as I know, in mysql you cannot create a database that is allready created.... So, the mysql_create_db() function *should* return an error.... -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php