Topic: Query Problem in PHP-MySQL script (Read 798 times)
Atari ST fan
Posts: 8
62 credits Members referred : 0
« on: Dec 19, 2006, 08:54:13 pm »
Hello:
I am currently working with the My Pagina previous-next navigation script. All was working fine until I altered the sql statement for the purpose of limiting the number of records pulled from the MySQL table I'm working with. When I run the following query in the script, all works fine:
SELECT * FROM news ORDER BY dtime DESC;
When I change it to the following:
SELECT * FROM news ORDER BY dtime DESC LIMIT 5;
I get the following error message:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/magnet/public_html/NewsScript/Display/my_pagina_class.php</b> on line 90
I know this is a legitimate query because I ran it through a query analyzer and it worked fine. Any input on what the problem might be would be greatly appreciated.
Anne Marie
I am a metal monkey!
Administrator Community Supporter?
Jedai Sword Master
Gender:
Posts: 5799
46391 credits Members referred : 3
« Reply #1 on: Dec 19, 2006, 09:01:58 pm »
Maybe that script parses the SQL statements somehow?
I am not familiar with the script you mention, but I am sure that your query is correct.