•
•
•
•
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
![]() |
•
•
Join Date: Jun 2006
Location: Nairobi, Kenya
Posts: 20
Reputation:
Rep Power: 3
Solved Threads: 0
•
•
Join Date: Jul 2006
Posts: 19
Reputation:
Rep Power: 3
Solved Threads: 1
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.
[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
![]() |
•
•
•
•
•
•
•
•
DaniWeb MySQL Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Can't connect to local MySQL server (MySQL)
- PHPNuke mysql error (PHP)
- Invision Power Board mysql error when trying to view newly created forums (PHP)
- Installin' MySQL Error ( Need help!) (Windows NT / 2000 / XP / 2003)
Other Threads in the MySQL Forum
- Previous Thread: real newbie problems!!
- Next Thread: Need authoritative source on safety of resetting ft_min_word_len


Linear Mode