954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/content/r/a/e/raeyshe/html/fanlisting/admin.php on line 21

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/content/r/a/e/raeyshe/html/fanlisting/admin.php on line 26

<?
if ((!$_POST['action'] && !$_GET['action']) || $_GET['action'] == "login") {
   // get total member count
   $querycount="SELECT id FROM $table";
   $resultcount=mysql_query($querycount);
   <strong>$numcount=mysql_num_rows($resultcount);</strong>
   // get total pending member count
   $querycount2="SELECT apr FROM $table WHERE apr!='y'";
   $resultcount2=mysql_query($querycount2);
   <strong>$numcount2=mysql_num_rows($resultcount2);</strong>
   ?>


-Lines 21 & 26 are in bold, red font.
Help anyone?

raeyshe
Newbie Poster
7 posts since Jul 2006
Reputation Points: 10
Solved Threads: 0
 

A couple things to check:
1. Is your query right? (If you have PHPMyAdmin or another such program you can direct enter queries.)
2. What is your query returning? One result or many? Are you getting multiple columns?

Try echoing the values of the variables before you try to use the queries. That may be of some help.

If you're looking at something a simple string can't deal with, take a look at the manual at php.net.

Puckdropper
Posting Pro
500 posts since Jul 2004
Reputation Points: 23
Solved Threads: 23
 

Never mind.... I figured it out myself... Thanks anyway

raeyshe
Newbie Poster
7 posts since Jul 2006
Reputation Points: 10
Solved Threads: 0
 

I uninstalled it then tried reinstalling. It somehow fixed the problem.

raeyshe
Newbie Poster
7 posts since Jul 2006
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You