tags:

views:

51

answers:

2

how can i check if a database is already existing

+2  A: 
if(mysql_select_db('db-name'))
    return true;
Evernoob
thank uuu Evermoob, it s working!!
You're welcome! :D
Evernoob
A: 

You can use the following query to check the database

select * from master.dbo.sysdatabases where name='databasename'

Hope that will help.

Asim Sajjad