| | |
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Jul 2006
Posts: 7
Reputation:
Solved Threads: 0
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
-Lines 21 & 26 are in bold, red font.
Help anyone?
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.
•
•
Join Date: Jul 2004
Posts: 494
Reputation:
Solved Threads: 21
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.
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.
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.
•
•
Join Date: Jul 2006
Posts: 7
Reputation:
Solved Threads: 0
Re: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in
0
#3 Jul 29th, 2006
•
•
Join Date: Jul 2006
Posts: 7
Reputation:
Solved Threads: 0
Re: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in
0
#4 Jul 29th, 2006
![]() |
Similar Threads
- Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource (PHP)
- Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource (PHP)
Other Threads in the PHP Forum
- Previous Thread: Searching my web page
- Next Thread: Running PHP scripts in backround
| Thread Tools | Search this Thread |
advanced alerts apache api archive array autosuggest beginner binary broken cakephp checkbox class clients cms code cron curl database date datepart display dynamic echo email emptydisplayvalue eregi error execute explodefunction file files folder form forms function functions google hack head href htaccess html if...loop image include insert ip javasciptvalidation javascript joomla keywords library limit link login mail matching menu mlm multiple mysql object oop password paypal pdf php phpincludeissue query radio random recursion recursive remote script search searchbox server sessions shot smarty source space speed sql syntax system table tutorial update upload url validator variable vbulletin video web website youtube





