...

View Full Version : Why doesn't fetch_array work on a remote server?



gilgalbiblewhee
04-18-2008, 06:36 AM
It works on a local server but not on a remote.

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in e:\vhosts\...\files\getTableContents.php on line 15

_Aerospace_Eng_
04-18-2008, 06:40 AM
Your query could be failing but you don't know because you aren't doing any error checking?

gilgalbiblewhee
04-18-2008, 06:47 AM
Your query could be failing but you don't know because you aren't doing any error checking?

Error: No database selected

hmmmm... I guess the next question is how to select a database on a remote server? I have MySQL but I was having a great difficulty with it.

_Aerospace_Eng_
04-18-2008, 06:56 AM
Well assuming that you are even connecting to the mysql server properly then mysql_select_db('databasename'); should be all you need. It will use the last successful connection to the database.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum