User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the MySQL section within the Web Development category of DaniWeb, a massive community of 427,442 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,690 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our MySQL advertiser: Programming Forums
Views: 1075 | Replies: 2
Reply
Join Date: Jun 2006
Location: Nairobi, Kenya
Posts: 20
Reputation: omesa is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
omesa omesa is offline Offline
Newbie Poster

Mysql Error

  #1  
Jun 29th, 2006
Hello, I get the error bolow on my page, could anyone with an idea tell me how to go around it?
mysql_num_rows(): supplied argument is not a valid MySQL result

Regards, omesa
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2006
Posts: 19
Reputation: b225ccc is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 1
b225ccc b225ccc is offline Offline
Newbie Poster

Re: Mysql Error

  #2  
Jul 5th, 2006
You need to pass a valid resource to the mysql_num_rows() function. For instance, you would generally build your query:
[php]$query = "SELECT * FROM tablename";[/php] Then to get the result:
[php]$result = mysql_query($query);[/php] You can then use the mysql_num_rows() function:
[php]$number_of_rows = mysql_num_rows($result);[/php]
If your code looks similar to what I have, check that your query is valid.


Originally Posted by omesa
Hello, I get the error bolow on my page, could anyone with an idea tell me how to go around it?
mysql_num_rows(): supplied argument is not a valid MySQL result

Regards, omesa
Reply With Quote  
Join Date: Jun 2006
Location: Nairobi, Kenya
Posts: 20
Reputation: omesa is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
omesa omesa is offline Offline
Newbie Poster

Re: Mysql Error

  #3  
Jul 6th, 2006
Thanks for your replies I will try it out and get back to you.
Regards, Omesa
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb MySQL Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the MySQL Forum

All times are GMT -4. The time now is 5:36 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC