By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,136 Members | 1,087 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,136 IT Pros & Developers. It's quick & easy.

ERROR: supplied argument is not a valid MySQL result

100+
P: 123
When I run my site from localhost, no error, but when I move it to
webhosting, it show below error, why?

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/asi50080/public_html/onlineadv/category.php on line 143

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/asi50080/public_html/onlineadv/category.php on line 155
Oct 15 '09 #1
Share this Question
Share on Google+
2 Replies


Dormilich
Expert Mod 5K+
P: 8,639
you donít check, whether mysql_query() doesnít return an error?
Oct 15 '09 #2

TheServant
Expert 100+
P: 1,168
Just add a die statement after your query before your count or fetch:
Expand|Select|Wrap|Line Numbers
  1. mysql_query("...") or die(mysql_error());
That should show you why.
Oct 15 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.