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

Thread Solved

Join Date: Jul 2006
Posts: 7
Reputation: raeyshe is an unknown quantity at this point 
Solved Threads: 0
raeyshe raeyshe is offline Offline
Newbie Poster

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

 
0
  #1
Jul 29th, 2006
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);
   $numcount=mysql_num_rows($resultcount);
   // get total pending member count
   $querycount2="SELECT apr FROM $table WHERE apr!='y'";
   $resultcount2=mysql_query($querycount2);
   $numcount2=mysql_num_rows($resultcount2);
   ?>

-Lines 21 & 26 are in bold, red font.
Help anyone?
Last edited by raeyshe; Jul 29th, 2006 at 10:57 am.
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 494
Reputation: Puckdropper is an unknown quantity at this point 
Solved Threads: 21
Puckdropper Puckdropper is offline Offline
Posting Pro in Training

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

 
0
  #2
Jul 29th, 2006
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.
www.uncreativelabs.net

Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 7
Reputation: raeyshe is an unknown quantity at this point 
Solved Threads: 0
raeyshe raeyshe is offline Offline
Newbie Poster

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

 
0
  #3
Jul 29th, 2006
Never mind.... I figured it out myself... Thanks anyway
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 7
Reputation: raeyshe is an unknown quantity at this point 
Solved Threads: 0
raeyshe raeyshe is offline Offline
Newbie Poster

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

 
0
  #4
Jul 29th, 2006
I uninstalled it then tried reinstalling. It somehow fixed the problem.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC