943,946 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Marked Solved
  • Views: 3869
  • PHP RSS
Jul 29th, 2006
0

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

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
raeyshe is offline Offline
7 posts
since Jul 2006
Jul 29th, 2006
0

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

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.
Reputation Points: 23
Solved Threads: 23
Posting Pro in Training
Puckdropper is offline Offline
494 posts
since Jul 2004
Jul 29th, 2006
0

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

Never mind.... I figured it out myself... Thanks anyway
Reputation Points: 10
Solved Threads: 0
Newbie Poster
raeyshe is offline Offline
7 posts
since Jul 2006
Jul 29th, 2006
0

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

I uninstalled it then tried reinstalling. It somehow fixed the problem.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
raeyshe is offline Offline
7 posts
since Jul 2006

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Searching my web page
Next Thread in PHP Forum Timeline: Running PHP scripts in backround





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC