You have to have the LIMIT clause after the ORDER clause.

Tyler Longren
Captain Jack Communications
[EMAIL PROTECTED]
www.captainjack.com

----- Original Message -----
From: "destr0" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 30, 2002 1:32 PM
Subject: LIMIT, ORDER Dilema


> Can you not have the LIMIT clause before the ORDER Clause in a select
query?
>
> SELECT * FROM myTable LIMIT 30, 45 ORDER BY someField ASC;
>
> This query  ^ fails with the error:
>
> Error 1064: You have an error in your SQL syntax near ' ORDER BY someField
> ASC' at line 1
>
> I just want to make sure that the case is that you can't have your LIMIT
> clause before your order clause.
>
>
>
> ---------------------------------------------------------------------
> 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
>


---------------------------------------------------------------------
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