Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2008
    Location
    Lake Stevens WA
    Posts
    14
    Plugin Contributions
    0

    help question SQL syntax error in creating discount coupons

    I have the following problem when creating discount coupons.
    Problem:
    Admin ..> Gift Certificate/Coupons ..> Coupon Admin
    Generates this error

    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, 0' at line 1
    in:
    [select coupon_id, coupon_code, coupon_amount, coupon_type, coupon_start_date,coupon_expire_date,uses_per_user,uses_per_coupon,restrict_to_p roducts, restrict_to_categories, date_created,date_modified, coupon_active, coupon_zone_restriction from zen_coupons where coupon_active='Y' and coupon_type != 'G' limit -0, 0]
    If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.


    Environment:
    Zen Cart version: 1.3.7.1
    Database Patch Level: v1.3.7.1 [2007-07-24 18:21:19] (Fresh Installation)
    PHP Version: 5.2.3 (Zend: 2.2.0)

    Mysql
    Active Persistent Links 0
    Active Links 1
    Client API version 5.0.45
    MYSQL_MODULE_TYPE external
    MYSQL_SOCKET /var/lib/mysql/mysql.sock
    MYSQL_INCLUDE -I/usr/include/mysql
    MYSQL_LIBS -L/usr/lib -lmysqlclient

    Client API version 5.0.45

    Server Host: web304.opentransfer.com (76.163.252.84)
    Server OS: Linux 2.6.18-53.1.7.el5.erekPAE
    Database Host: mysql301.ixwebhosting.com (76.162.254.148)
    HTTP Server: Apache/1.3.37 (Unix) mod_throttle/3.1.2 FrontPage/5.0.2.2635 mod_psoft_traffic/0.2 mod_ssl/2.8.28 OpenSSL/0.9.8b

    Action taken:
    Looked at the code /zencart/admin/coupon_admin.php

    Not being a coder I did not see anything wrong.
    Renamed the file and then went to the support site and downloaded
    zen-cart-1.3.7.1-full-patched-07052007.zip extracted the coupon-admin.php file and uploaded to the web server.

    Tried the Admin ..> Gift Certificate/Coupons ..> Coupon Admin
    Again and got the same error.

    Any ideas

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: SQL syntax error in creating discount coupons

    Admin->Configuration->GV Coupons->Maximum Discount Coupons Per Page ... set it to something NOT 0 and NOT blank.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Mar 2008
    Location
    Lake Stevens WA
    Posts
    14
    Plugin Contributions
    0

    Default Re: SQL syntax error in creating discount coupons

    Thanks that did the trick. would never guessed.

    Love working with the zen cart

    Del

 

 

Similar Threads

  1. v138a Creating coupons from sql script?
    By solo_400 in forum General Questions
    Replies: 1
    Last Post: 21 Feb 2012, 07:58 PM
  2. Replies: 1
    Last Post: 25 Aug 2011, 05:58 AM
  3. Discount Coupons Syntax Error
    By RobertG in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 0
    Last Post: 15 Feb 2010, 06:26 PM
  4. SQL Syntax error: check for right syntax to use near '000000
    By gabyone in forum General Questions
    Replies: 2
    Last Post: 9 Feb 2008, 08:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg