Limit needs to be the last line in your query

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 2/2/04, 1:55:13 PM, Matthew Stuart <[EMAIL PROTECTED]> wrote regarding 
LIMIT not working problem:


> This query is working fine apart from the LIMIT part. I can't see what
> is wrong with it, I have tried it in different places and still no
> luck. Does anybody know why it's not working?

> WHERE (fld_headline LIKE'%userinput%' OR fld_summary LIKE'%userinput%'
> OR fld_body LIKE'%userinput%') AND fld_category LIKE 'catvalue' AND
> fld_reldate BETWEEN 'startdatevalue' AND 'enddatevalue' AND fld_show =
> 1 AND fld_reldate <= NOW() LIMIT 50
> ORDER BY fld_reldate

> Error is: You have an arror in your SQL syntax. Check the manual blah,
> blah ... for the right syntax to use near 'limit 100' at line 4.

> Where 'limit 100' has come from I don't understand, but what ever I put
> as a LIMIT value it always states 'limit 100'.

> TIA

> Mat

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to