Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mysql_fetch_array problem 1

Status
Not open for further replies.

Trevoke

Programmer
Jun 6, 2002
1,142
US
It's more MySQL than PHP... So I'll ask here. I'm using webchess ( and when I go to the page where I see the game, this is what it says on the page (although it looks normally except for that)
Code:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/trevok/public_html/webchess/chessdb.php on line 446

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/trevok/public_html/webchess/chessdb.php on line 495

I put a copy of the chessdb.php file at .

I'm sorry this isn't more detailed, I still know next to nothing about PHP and MySQL, so I wouldn't even know how to begin troubleshooting this, or what exactly to give you as far as information goes..

-Haben sie fosforos?
-No tiengo caballero, but I have un briquet.
 
That is most likely a poorly configured PHP installation, as it can't find the information on the mysql functions.

Support for PHP -> 4 <- is built in. Support for PHP 5 has to be configured. You should uncomment the 'extension=php_mysql.dll' line and set the extension_dir path in the php.ini file.

For more info take a look here:

hope this helps




----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
When the PHP language engine invokes mysql_query() with a SELECT query, the function will return either a FALSE if there is an error or a handle to the result of the query. A result handle can be passed to mysql_fetch_array() -- FALSE cannot.

If a script attempts to use a FALSE as a result set handle, that's the error you get.

I recommend you try to figure out why your queries are failing.

Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Oops, misread the error. "Sleipny" is right. Check your queries. an see if they are actually returning something. Other than a FALSE.





----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
How can I do that? Just do something like print the result?

-Haben sie fosforos?
-No tiengo caballero, but I have un briquet.
 
Got it. Thank you.
I had apparently *cough cough* forgotten to fill the table from which the code was trying to get information.

-Haben sie fosforos?
-No tiengo caballero, but I have un briquet.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top