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);
   [B]$numcount=mysql_num_rows($resultcount);[/B]
   // get total pending member count
   $querycount2="SELECT apr FROM $table WHERE apr!='y'";
   $resultcount2=mysql_query($querycount2);
   [B]$numcount2=mysql_num_rows($resultcount2);[/B]
   ?>

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

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.

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.