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

Reply via email to