Skip to main content
Inspiring
Sep 20, 2010 4:30 PM UTC
Answered

No database selected only happening on one page

Hi,

I have a site that works with php and mysql database connection, other database elements work. Apart from on one page.

It just says: No database selected

This is happening on the server only. It works fine on localhost (XAMPP)

This topic is closed to new replies. Start a new post to keep the conversation going.
Lawrence_Cramer
Lawrence_CramerCorrect answer
Inspiring
Sep 21, 2010 1:41 PM UTC

If it works fine locally but not on the server then you need to track down what is different on the server.  First, check and see that your query code doesn't have any case issues. If your site is hosted on a Linux or Unix server then "DsnName" would not be the same as "dsnname" - this would work on a Windows system because Windows is not case sensitive.  Next check with your host and tell them this works locally but not on the server and ask then to see if they can see the reason. A good host can be very helpful in these sort of situations.

Hope this helps.

--
Lawrence Cramer - *Adobe Community Professional*


http://www.Cartweaver.com
Shopping Cart for Adobe Dreamweaver
available in PHP, ColdFusion, and ASP

Stay updated - http://blog.cartweaver.com

1 reply

Lawrence_Cramer
Lawrence_CramerCorrect answer
Inspiring
Sep 21, 2010 1:41 PM UTC

If it works fine locally but not on the server then you need to track down what is different on the server.  First, check and see that your query code doesn't have any case issues. If your site is hosted on a Linux or Unix server then "DsnName" would not be the same as "dsnname" - this would work on a Windows system because Windows is not case sensitive.  Next check with your host and tell them this works locally but not on the server and ask then to see if they can see the reason. A good host can be very helpful in these sort of situations.

Hope this helps.

--
Lawrence Cramer - *Adobe Community Professional*


http://www.Cartweaver.com
Shopping Cart for Adobe Dreamweaver
available in PHP, ColdFusion, and ASP

Stay updated - http://blog.cartweaver.com

Translate