List:General Discussion« Previous MessageNext Message »
From:Gerald Clark Date:October 16 2001 7:35pm
Subject:Re: MySQL 4.0 - Order By & Limit
View as plain text  
Well, then you need to ORDER BY #,letter


Ashwin Kutty wrote:

> Hi,
> 
> I thought version 4.0 was supposed to do a Order By first and then a
> Limit after that on the results returned on a SELECT.. I have just
> installed the new version and I hit the same problem I was hitting
> before, i.e., the Limit seems to be executing first and then the Order
> By causing all the results to be haphazard when they display.. Now if I
> go for a wider set of results, i.e. increase the Limit, the results come
> a lot better then, i.e. more of them are ordered right, but then, again,
> it still skips a lot more.. As an example:-
> 
> Results Set
> # letter
> 1 f
> 1 a
> 2 b
> 1 c
> 3 d
> 1 e
> 1 h
> 1 g
> 
> 
> Limit 2
> 
> Order By #
> 
> 1 a
> 1 f
> 
> Then when I go to the next set, I get
> 
> 1 c
> 1 e
> 
> Instead I would like it to be as the following:-
> First Set:-
> 1 a
> 1 c
> Second Set:-
> 1 e
> 1 f
> 
> etc..
> 
> Any ideas?
> 
> These are a few specs of the server & stuff..
> Linux kernel 2.4.7-2 on a Redhat 8 server running Mysql 4.0.0-alpha
> The query I have is as follows:-
> SELECT * from tablename WHERE fieldname LIKE "%keyword%" ORDER BY
> fieldname DESC LIMIT 0,10;
> 
> Thanks..
> 
> 
> ---------------------------------------------------------------------
> 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 <mysql-thread88073@stripped>
> To unsubscribe, e-mail
> <mysql-unsubscribe-gerald_clark=suppliersystems.com@stripped>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-- 
Gerald L. Clark
gerald_clark@stripped

Thread
Re: MySQL 4.0 - Order By & LimitFournier Jocelyn [Presence-PC]16 Oct
Re: MySQL 4.0 - Order By & LimitAshwin Kutty18 Oct
  • RE: MySQL 4.0 - Order By & LimitSteve Meyers18 Oct
    • RE: MySQL 4.0 - Order By & LimitAshwin Kutty18 Oct
      • RE: MySQL 4.0 - Order By & LimitSteve Meyers19 Oct
Re: MySQL 4.0 releasedMichael Furgal18 Oct
  • Re: MySQL 4.0 releasedMichael Widenius19 Oct
RE: MySQL 4.0 releasedBritt Johnston19 Oct
  • Mysql server doesn't runMark Coldheart19 Oct
    • Re: Mysql server doesn't runBill Adams19 Oct
  • RE: MySQL 4.0 releasedMichael Widenius19 Oct
RE: MySQL 4.0 releasedMichael Widenius19 Oct
RE: MySQL 4.0 releasedRichard C. Tucker19 Oct