Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result

RegisterLogin
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
Post Description: Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result
Tags: Warning:, mysql_fetch_row():, supplied, argument, is, not, a, valid, MySQL, result
This Post Was Posted On Feb 29, 2008 By webmaster #1466
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in C:htdocshomeforumsviewforum.php on line 6

the other day a customer reported a problem with their website, he was doing some changes and could not find out what he did to cause this error.

in case you are also having this problem, today i will show you what's going on and how to fix it.


on line six of his viewforum.php file is said:


     Code:
$sql = "select count(topic_id) from phpbb_topics forum_id='".$_GET[f]."'";


looking at the code, you can clearly see that he forgot to put the WHERE in the $sql declaration. so to fix it, it should look like this:



     Code:
$sql = "select count(topic_id) from phpbb_topics where forum_id='".$_GET[f]."'";


so basically if you are getting this erros it means that way you are declaring your sql fetch has an incorrect format, you probably forgot to add something, mispelled a word or a variable or have something a table or field in the database that doesn't exist.
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
©2011 Webune Forums - Sat Dec 24, 2011 11:38 am
Powered by: Webune Forums V3