Author Topic: 1064 You have an error in your SQL syntax  (Read 291 times)

Moritz

  • Guest
1064 You have an error in your SQL syntax
« on: June 09, 2012, 08:24:42 AM »
Gentlemen,

the following appears while trying to restrict the coupon within the ZenCart admin panel:

Code: [Select]
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-0, MAX_DISPLAY_RESTRICT_ENTRIES' at line 1
in:
[select * from data_coupon_restrict where coupon_id = '1' and category_id != '0' limit -0, MAX_DISPLAY_RESTRICT_ENTRIES]

Last steps i been doing before having this issue:
Moving entire zen cart (open source shopping card) onto another server, including mySQL

I assume, while reading the output, there is a new syntax necessary as of another mySQL version?

All other functions of the website are 100% working.

Thanks for your assistance

RaythXC

  • PHP Programmer & Web-Designer
  • Expert PHP Helper
  • Senior Member
  • *****
  • Posts: 395
  • Karma: 10
  • Freelance PHP Programmer/Web-Designer
    • View Profile
    • Rayth.Info
Re: 1064 You have an error in your SQL syntax
« Reply #1 on: June 09, 2012, 03:15:59 PM »
You can't limit 0 or -0. 0 returns No values, and -0 isn't even a number.
RaythXC - My Home Site
Note: most answers I give come from the php manual located at PHP.Net