MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Saroj AA R62 Bono Date:May 27 2004 7:59pm
Subject:query to see if db exists...........mysql_query( myQuery)
View as plain text  
I am going to use mysql_query() and want to find out if a certain
database  exists. If  mysql_real_connect() fails there are many errors
that could account for this. The database may exist , and I cant take
the error returned from the failed  query to mean the db isnt there and
should be created. So what sort of query can I use to see whether the db
exists? I thought of "USE myDb" but once again a failed mysql_query cant
rule out other factors that can cause the failure. Any suggestions? 
Many thanks,
sb

Thread
query to see if db exists...........mysql_query( myQuery)Saroj AA R62 Bono27 May
  • Re: query to see if db exists...........mysql_query( myQuery)Jim Winstead28 May
Re: query to see if db exists...........mysql_query( myQuery)Stephen E. Bacher28 May