RE: Limit and Order by

2002-12-05 Thread John Coder
On Thu, 2002-12-05 at 19:39, Michelle de Beer wrote: > > you mean mySQL does the search on 100 first entries > > and then order the > > results, instead of getting the results and > > returning only the first 100 ? > > If yes I too would like to know what's the right way > > to do it in SQL then ?

Re: Limit and Order by

2002-12-05 Thread Jeff Kilbride
older versions of MySQL had a bug with order by and limit clauses, though... --jeff - Original Message - From: "Michelle de Beer" <[EMAIL PROTECTED]> To: "Alliax" <[EMAIL PROTECTED]>; "mysql list" <[EMAIL PROTECTED]> Sent: Thursday, Dece

Re: Re: Limit and Order by

2002-12-05 Thread Michael T. Babcock
On Thu, Dec 05, 2002 at 02:00:43PM -0800, Michelle de Beer wrote: > Select * from mytable ORDER by total desc limit 0, 100 See my other most recent reply; you can do it in two queries: CREATE TEMPORARY TABLE Top100 SELECT * ... limit 0,100; SELECT * FROM Top100 ORDER BY ...; The temporary table

Re: Limit and Order by

2002-12-05 Thread Steve Edberg
At 2:00 PM -0800 12/5/02, Michelle de Beer wrote: How can I limit the result after the "order by" has been executed? This stops efter 100 rows and the result is not as I intended... Select * from mytable ORDER by total desc limit 0, 100 Must this be done in PHP? Perhaps you could tell us wha

RE: Limit and Order by

2002-12-05 Thread Michelle de Beer
> you mean mySQL does the search on 100 first entries > and then order the > results, instead of getting the results and > returning only the first 100 ? > If yes I too would like to know what's the right way > to do it in SQL then ? That is correct. This is what I have: One table with 1000 recor

RE: Limit and order by

2002-12-05 Thread John Coder
MYSQL On Thu, 2002-12-05 at 17:00, Michelle de Beer wrote: > How can I limit the result after the "order by" has > been executed? This stops efter 100 rows and the > result is not as I intended... > > Select * from mytable ORDER by total desc limit 0, 100 > > Must this be done in PHP? > > Thanks

RE: limit and order by issuse

2001-09-06 Thread [EMAIL PROTECTED]
issue is solved. check change log here: http://phpmyadmin.sourceforge.net/ChangeLog.txt regards, shahzad -Original Message- From: Henning Schroeder [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 05, 2001 3:23 PM To: [EMAIL PROTECTED] Subject: RE: limit and order by issuse >

Re: limit and order by issuse

2001-09-05 Thread Fournier Jocelyn [Presence-PC]
This is fixed in PhpMyAdmin 2.2.0 - Original Message - From: "Henning Schroeder" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 06, 2001 12:23 AM Subject: RE: limit and order by issuse > > >sh> Here is my query: > >

RE: limit and order by issuse

2001-09-05 Thread Henning Schroeder
>sh> Here is my query: > >sh> SELECT >sh> articleId,arttitle,artsourceId,artstatus,artauthorId,arteventdate,artpre >sh> ss,artpageno,artrankId,artabstract, >sh> artfulltext,artisdisplay,arteditionId,arttypeid,artsubjectid , >sh> asubjectId,asubjectname , FLOOR((TO_DAYS(CURRENT_DATE()) - >sh> TO_D

RE: limit and order by issuse

2001-09-05 Thread Michael Widenius
Hi! > "sh" == shahzazd@shebaak com <[EMAIL PROTECTED]> writes: sh> Thanks for quick response. sh> Here is my query: sh> SELECT sh> articleId,arttitle,artsourceId,artstatus,artauthorId,arteventdate,artpre sh> ss,artpageno,artrankId,artabstract, sh> artfulltext,artisdisplay,arteditionId,artt

RE: limit and order by issuse

2001-09-04 Thread Philip Mak
I see... if adding "ORDER BY articleId DESC LIMIT 0, 20" causes a query to start returning 0 rows, then that sounds like something is wrong. Try using the REPAIR TABLE command on all your tables from inside MySQL, e.g.: REPAIR TABLE article; REPAIR TABLE asubject; REPAIR TABLE atype; REPAIR TABL

RE: limit and order by issuse (fwd)

2001-09-04 Thread Philip Mak
[table sql stupid spam filter] On Tue, 4 Sep 2001, [EMAIL PROTECTED] wrote: > order by articleId desc limit 1 , 20 That will cause no rows to be returned if there are less than 20 results. Use this instead: ORDER BY articleId DESC LIMIT 0, 20 It starts counting at 0 instead of 1. -

RE: limit and order by issuse

2001-09-04 Thread [EMAIL PROTECTED]
al 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 s

Re: limit and order by issuse

2001-09-04 Thread Philip Mak
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 yo