No Database Selected error PHP/MySQL

When my page first loads it occassionally responds with error "No Database Selected"
if i click refresh several times, the page will load normally.

rac_skellyAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
nplibConnect With a Mentor Commented:
do you have the line
mysql_select_db('yourdb");

after your connect statement?
0
 
Cornelia YoderArtistCommented:
Gonna be very hard to help you if you don't post some code.
0
 
hieloCommented:
it sounds like you are missing or not executing
mysql_select_db("dbname");

before executing your queries. post your code.
0
 
MMDeveloperCommented:
since it does work occasionally, is your database server locking up? Can it handle the traffic? Is the server itself flaky? Is your database being locked? Corrupted?
0
 
rac_skellyAuthor Commented:
Thanks we figured out....   we had mislabeled our connection scripts!
0
All Courses

From novice to tech pro — start learning today.