UCP Help!
#1

Guys, i am getting this error in My UCP:-
PHP код:
PHP Error Message
Warning
mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/a8580654/public_html/ucp/index.php on line 60 
PHP код:
((LINE 60 Code:-))  if(mysql_num_rows($result) > 0
Second error:-
PHP код:
PHP Error Message
Warning
mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/a8580654/public_html/ucp/ucp.php on line 31 
PHP код:
((LINE 31 Code:-)) if(mysql_num_rows($result) > 29
Third Error:-
PHP код:
PHP Error Message
Warning
mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/a8580654/public_html/ucp/ucp.php on line 44 
PHP код:
((LINE 44 Code:-)) $wa mysql_num_rows($result); 
Kindly someone tell me how to fix these!
Reply
#2

Can someone plz tell me how to fix these!?
Reply
#3

This could happen, when mysql_query returns false, if it fails for some reason. So you can try this.

It happened with me long ago , you can use similar code to debug it.

Код:
$result = mysql_query($sql);
if ($result === false) {
    // error handling
    return false;
}
Reply
#4

Can u please post in the mysql query in each case the error comes so we can assist you better it is a known error when the mysql_query returns false value.
Reply
#5

Could you supply us with more code? What's the query you're trying to execute?

You can find out what error was thrown by mysql_query() by using the mysql_error() function. It will tell you what the problem is with the query. (you could easily have mis-spelled a field name, or got a field in the wrong table prefix, etc; you'd need to see the error response to know for sure what the problem is)

Use
Код:
$result = mysql_query($result) or die(mysql_error());
What does this show?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)