List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 30 2002 7:24pm
Subject:Re: LIMIT, ORDER Dilema
View as plain text  
At 13:06 -0800 3/30/02, destr0 wrote:
>----- Original Message -----
>From: "Paul DuBois" <paul@stripped>
>To: "destr0" <joellist@stripped>; <mysql@stripped>
>Sent: Saturday, March 30, 2002 10:36 AM
>Subject: Re: LIMIT, ORDER Dilema
>
>
>>  Does that even make sense?  "records 30 - 45" has no meaning, given
>>  that the server is free to return records in any order it pleases.
>
>a select query issued on a table with an autoincremented field and no ORDER
>clause seems to default to having it's results returned in order of  the
>autoincremented field, ASC. I was saying "records 30 - 45" in terms of
>that.

What you're seeing is purely coincidence and should NOT be relied on.
But in this case, why don't you simply do:

SELECT .... ORDER BY id, col1, col2, ... LIMIT 29, 16

where col1, col2, etc., are the columns within records 30-45 that
you want to sort those 16 records by?  I think that's probably the
solution you're looking for.
Thread
LIMIT, ORDER Dilemadestr030 Mar
  • Re: LIMIT, ORDER DilemaTyler Longren30 Mar
  • Re: LIMIT, ORDER DilemaPaul DuBois30 Mar
Re: LIMIT, ORDER Dilemadestr030 Mar
  • Re: LIMIT, ORDER DilemaPaul DuBois30 Mar
Re: LIMIT, ORDER Dilemadestr030 Mar
  • Re: LIMIT, ORDER DilemaPaul DuBois30 Mar
    • RE: LIMIT, ORDER DilemaRoger Baklund30 Mar
      • RE: LIMIT, ORDER DilemaPaul DuBois30 Mar
  • Calculate current age with given birthdaySon Nguyen30 Mar
    • RE: Calculate current age with given birthdayRoger Baklund30 Mar
      • RE: Calculate current age with given birthdayPaul DuBois30 Mar
        • RE: Calculate current age with given birthdayMichael Stassen30 Mar
Re: LIMIT, ORDER DilemaSteven Roussey30 Mar
RE: Calculate current age with given birthdayPaul DuBois31 Mar
  • RE: Calculate current age with given birthdayMichael Stassen2 Apr