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 ?
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
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
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
> 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
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
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
>
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:
> >
>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
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
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
[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.
-
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
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
14 matches
Mail list logo