Jump to content

[SOLVED] Getting 'No database selected' in php runtime


Recommended Posts

Hi there, I'm using the WAMP 2.0 (the latest version downloaded)

 

 

I've just transferred my database from on pc to another. The data is showing up okay in phpmyadmin, and can run successful queries, yet when i use the same standalone php scripts that I used on the original pc, they are coming through with the 'No database selected' (the error message comes from a 'or die (mysql_error())')

 

i've kept the user/pass as root/'' to eliminate a password error.

 

What does everyone recommend i check?

Thanks,JJ

I feel like such a (enid blyton) noddy. just realised that i coded this before i upgraded to a WAMP version that requires you to put <?php instead of getting away with just <? on the first line. this was missing from my config db files!

 

Thanks for your help, it made me look in the right place, just fell asleep in my PHP101 lecture.

 

JJ

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.