No database selected error

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

No database selected error

Post by Benjamin »

Anyone know what would cause a periodic database not selected error? It's a simple script that simply connects to the database to retrieve some results. Not a conditional issue or anything like that. Database name is hardcoded in the script.
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post by raghavan20 »

can you show your code???

Most of the times, when you open up a new connection and try to execute the statements without mysqi(i)_select_db, it should return that error. If you are using OO, make sure the db opening up calls are happening properly.
Post Reply