PDA

View Full Version : [PHP] Warning: mysql_fetch_object():



subman
May 12th, 2010, 01:36 PM
Hello!

I keep getting this error: Warning: mysql_fetch_object(): supplied argument is not a valid MySQL result resource in /opt/lampp/htdocs/functions.php on line 6

and it wont show results.

the code -> http://pastebin.com/nH7pAWs2

Any help?

roccivic
May 12th, 2010, 02:18 PM
Well, you need to connect to the database first...
http://php.net/manual/en/function.mysql-connect.php

subman
May 12th, 2010, 02:20 PM
No i don't thats already done. this is just a snippet of the whole 500 line functions page.

subman
May 12th, 2010, 02:26 PM
Solved- SQL Table was misspelled.

roccivic
May 12th, 2010, 02:29 PM
Maybe the query is failing... Typo in the field name or something?
Did you try to run the query in phpMyAdmin or mysql client?
Do you get any results there?

Seal Daemon
May 12th, 2010, 02:36 PM
Catch your mistakes before you move on ;)


mysql_query($querry) or die(mysql_error());