Thanks for quick response.

Here is my query:

SELECT
articleId,arttitle,artsourceId,artstatus,artauthorId,arteventdate,artpre
ss,artpageno,artrankId,artabstract,
artfulltext,artisdisplay,arteditionId,arttypeid,artsubjectid ,
asubjectId,asubjectname , FLOOR((TO_DAYS(CURRENT_DATE()) -
TO_DAYS(arteventdate))/365.25) as dif , atypeId, atypename, authorId,
autname , sourceId, srcname ,usrfname ,usrlname from article ,asubject
,atype ,author, source left join user on user.userId = article.user
where artstatus!='N' and artsourceId = sourceId and authorId =
artauthorId and arttypeid = atypeId and asubjectId=artsubjectid and
artauthorid=145 order by articleId desc limit 1 , 20


-  When my application in php is getting data from mysql it gets some
rows. And show no error. [ mysql_error()  show no error]

-  When I run same query on phpmyadmin query prompt, it gives an error
with no description.

-  If I remove limit portion of query, then show there is no error even
on phpmyadmin.

There is no syntax error in query.

I am using nusphere with MySQL Version 3.23.38 and php Version 4.0.1
There must some thing wrong limit portion of query.


Regards,
shahzad



-----Original Message-----
From: Philip Mak [mailto:[EMAIL PROTECTED]] On Behalf Of
Philip Mak
Sent: Tuesday, September 04, 2001 3:25 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: limit and order by issuse

On Tue, 4 Sep 2001 [EMAIL PROTECTED] wrote:

> I am trying to use limit and order by in the same query for paging of
> records. But faceing the problem that query does not return any row.
> After removing of limit every thing is working fine.
>
> Is it really a bug. Any solution.

Going by what you have told me, I'm thinking that your LIMIT statement
may
be incorrect. Show us what the query you are executing is so that we can
see what is happening; I don't have enough information to answer your
question right now.


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to