| | |
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jan 2006
Posts: 3
Reputation:
Solved Threads: 0
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource
0
#1 Jan 13th, 2006
Hey there, im not very great at php and im wondering how i could fix this error
This is line 328
$num1=mysql ect ect is line 328 any help is much apreicated.
PHP Syntax (Toggle Plain Text)
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home2/blindst/public_html/forumbeta/vtopic.php on line 328 No replys to this topic.
This is line 328
PHP Syntax (Toggle Plain Text)
$sql2=("SELECT * FROM `reply` WHERE tid = '$id' ORDER by id LIMIT $from, $div"); $query2=mysql_query($sql2); $num1=mysql_num_rows($query2);
$num1=mysql ect ect is line 328 any help is much apreicated.
•
•
Join Date: Jan 2006
Posts: 15
Reputation:
Solved Threads: 0
Re: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource
0
#2 Jan 13th, 2006
You're mysql query isnt a valid one, first off, at the end of querys you should get use to doing this:
mysql_query(blah) or die(mysql_error());
That will tell you if the query doesn't work.
Really, without seeing your table there isnt much that I can tell you to fix, just check all your names and do what I said above. Also, it doesn't hurt to echo $query2 to find out what it says inside that, if it's not a valid pointer your sql will fail. Try messing around with what I said a little and if it still doesn''t help, come back.
Oh also, at the top of your put this:
error_reporting ( E_ALL);
That will help in deciding on what the errors specifically are.
mysql_query(blah) or die(mysql_error());
That will tell you if the query doesn't work.
Really, without seeing your table there isnt much that I can tell you to fix, just check all your names and do what I said above. Also, it doesn't hurt to echo $query2 to find out what it says inside that, if it's not a valid pointer your sql will fail. Try messing around with what I said a little and if it still doesn''t help, come back.
Oh also, at the top of your put this:
error_reporting ( E_ALL);
That will help in deciding on what the errors specifically are.
•
•
Join Date: Jan 2006
Posts: 3
Reputation:
Solved Threads: 0
Re: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource
0
#3 Jan 13th, 2006
•
•
Join Date: Jan 2006
Posts: 15
Reputation:
Solved Threads: 0
Re: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource
0
#4 Jan 13th, 2006
•
•
Join Date: Jan 2006
Posts: 3
Reputation:
Solved Threads: 0
Re: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource
0
#5 Jan 15th, 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 in (PHP)
Other Threads in the PHP Forum
- Previous Thread: I Need Help Please. Adding PHP Code To My Site.
- Next Thread: Passing Information Between pages
| Thread Tools | Search this Thread |
.htaccess alexa apache api array beginner beneath binary broadband broken cakephp checkbox class cms code convert cron curl database date display dynamic echo email emptydisplayvalue encode error fcc file files folder form forms function functions google howtowriteathesis href htaccess html image images include insert ip javascript joomla key keywords limit link login mail mail() memberships menu mlm multiple multipletables mysql mysql_real_escape_string network oop open passwords paypal pdf php provider query radio random redirect remote rss script search securephp server sessions smtp source space sql strip_tags syntax system table template tutorial update upload url user validator variable video voteup web youtube





