28, May 2012

Query Problem in PHP-MySQL script - webmaster forum

 
Webdigity webmaster forums
[ Home | Help | Search | Forum's Shop | Archive | Login | Register | Webmaster Directory ]
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: Query Problem in PHP-MySQL script
« previous next »
Pages: [1] Print
Instabuck - The easy way to sell digital products online

Author 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: Male
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.

BTW congrats for your first post here Smiley

Trial and Error my two best teachers Cool
Join us @ facebook or twitter

Last blog : Butterfly Marketing 2.0
Global Moderator
Community Supporter ?
Jedai Sword Master
*****
Gender: Male
Posts: 6691
34714 credits
Members referred : 374


It's time to use PHP5!


« Reply #2 on: Dec 19, 2006, 10:25:27 pm »

hello why do you double post this thread?

<closed />

Trackback URI for this entry : http://www.webdigity.com/trackback.php?topic=5297
Tags : php-mysql Bookmark this thread : Digg Del.icio.us Dzone more....

Pages: [1] Print 
Webdigity Webmaster Forums  >  Web Development  >  PhP
Topic: Query Problem in PHP-MySQL script
« previous next »
Jump to:
User Area
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 28, 2012, 07:10:50 pm





Login with username, password and session length

Donate to our community, and get a permanent link back to your site!

Donate to our community, and get a permanent link back to your site!






Web Design Gallery · Whois Lookup · Pagerank · Tag Browsing · Lo-fi version · Syndication · Webmaster forum history · Advertise
Developed by HumanWorks © 2005 - 2012 Webdigity webmaster community · sublime directory
Webdigity Webmaster Forums | Powered by SMF 1.0.12. © 2001-2005, Lewis Media. All Rights Reserved.