Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2007
    Posts
    3
    Plugin Contributions
    0

    Default 1064 You have an error in your SQL syntax;

    Hello:

    Customers have received the following error when in the final checkout step with Zen Cart 1.3.7. Any help would be appreciated:

    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 's World - The Amazing Adventures of Kid Astro CD(qty: 1) [Date] => March 7,' at line 1
    in:
    [insert into zenauthorizenet (id, customer_id,order_id, response_code, response_text, authorization_type, transaction_id, sent, received, time, session_id) values ('', '4', '16', '1', 'This transaction has been approved.', 'auth_capture', '1363767816', 'Array ( [x_login] => ******* [x_tran_key] => ******* [x_relay_response] => FALSE [x_delim_data] => TRUE [x_version] => 3.1 [x_type] => AUTH_CAPTURE [x_method] => CC [x_amount] => 19.98 [x_card_num] => *******6491 [x_exp_date] => 0210 [x_card_code] => ******* [x_email_customer] => FALSE [x_email_merchant] => FALSE [x_cust_id] => 4 [x_invoice_num] => 16 [x_first_name] => Nate [x_last_name] => Johnson [x_company] => [x_address] => 200 Fullerton Ave [x_city] => Chicago [x_state] => Illinois [x_zip] => 60645 [x_country] => United States [x_phone] => 919-942-4848 [x_email] => n***** AT hotmail DOT com [x_ship_to_first_name] => Nate [x_ship_to_last_name] => Johnson [x_ship_to_address] => 777 W. St [x_ship_to_city] => Chicago [x_ship_to_state] => Illinois [x_ship_to_zip] => 60634 [x_ship_to_country] => United States [x_description] => Ralph's World - The Amazing Adventures of Kid Astro CD(qty: 1) [Date] => March 7, 2007, 11:40 pm [IP] => 24.148.15.229 [Session] => 43b414c1e661e341f95db0168e8e938a [url] => https://secure.authorize.net/gateway/transact.dll ) ', '1=1&2=1&3=1&4=This+transaction+has+been+approved.&5=48225B&6=Y&7=1364707816&8=1 6&9=Ralph%27s+World+-+The+Amazing+Adventures+of+Kid+Astro+CD%28qty%3A+1%29&10=19.98&11=CC&12=auth_cap ture&13=4&14=Nate&15=Johnson&16=&17=2009+W+Arthur+Ave&18=Chicago&19=Illinois&20= 60645&21=United+States&22=919-942-4848&23=&24=n******%40hotmail.com&25=Nate&26=Johnson&27=&28=777+W.+St&29=Chicago &30=Illinois&31=60634&32=United+States&33=&34=&35=&36=&37=&38=00C5A4F218A40D729C CEABB1BBA20182&39=M&40=&41=&42=&43=&44=&45=&46=&47=&48=&49=&50=&51=&52=&53=&54=& 55=&56=&57=&58=&59=&60=&61=&62=&63=&64=&65=&66=&67=&68=&69=March+7+2007+11%3A40+ pm&70=24.148.15.229&71=43b414c1e661e341f95db0168e8e938a', 'March 7, 2007, 11:40 pm', '43b414c1e661e341f95db0168e8e938a')]

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: 1064 You have an error in your SQL syntax;

    temporarily disable the "enable database storage" option in authorizenet module as it is not handling quotes in the product names

    Ralph's World - The Amazing Adventures of Kid Astro CD

    This will be updated as soon as we can ...

    Moving to Bug Reports ... thanks!
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Jan 2004
    Posts
    66,441
    Plugin Contributions
    279

    Default Re: 1064 You have an error in your SQL syntax;

    You could try replacing this line (around 353 ? ):
    Code:
    'x_description' => $description,
    with this:
    Code:
    'x_description' => str_replace(array('"',"'",'&','&'), '', $description),
    .

    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.

  4. #4
    Join Date
    Mar 2007
    Posts
    3
    Plugin Contributions
    0

    Default Re: 1064 You have an error in your SQL syntax;

    Thanks for your help. Removing the apostrophes in the title fixed the problem. Then I tried disabling database storage -- that allowed me to put the apostrophes back in with no problems. Thanks.

  5. #5
    Join Date
    Mar 2007
    Posts
    20
    Plugin Contributions
    0

    Default Re: 1064 You have an error in your SQL syntax;

    Quote Originally Posted by Ajeh View Post
    temporarily disable the "enable database storage" option in authorizenet module as it is not handling quotes in the product names

    Ralph's World - The Amazing Adventures of Kid Astro CD

    This will be updated as soon as we can ...

    Moving to Bug Reports ... thanks!
    Can you tell me if this bug has been fixed in 1.3.7.1? I'm not seeing it in the release notes, so that's probably a bad sign. :)

    - Scott

  6. #6
    Join Date
    Jan 2004
    Posts
    66,441
    Plugin Contributions
    279

    Default Re: 1064 You have an error in your SQL syntax;

    Here's an update with another approach here:
    http://www.zen-cart.com/forum/showthread.php?t=70801

    v1.3.8 will address it.
    .

    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.

 

 

Similar Threads

  1. v151 1064:You have an error in your SQL syntax;
    By holsterland in forum General Questions
    Replies: 5
    Last Post: 5 May 2014, 11:58 PM
  2. v139h 1064 You have an error in your SQL syntax;
    By bubbadan in forum General Questions
    Replies: 2
    Last Post: 14 Jul 2012, 10:48 PM
  3. 1064 You have an error in your SQL syntax ...
    By autoace in forum General Questions
    Replies: 7
    Last Post: 9 Feb 2011, 03:21 PM
  4. 1064 You have an error in your SQL syntax
    By NickCB1966 in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 7 Aug 2010, 08:30 AM
  5. 1064 You have an error in your SQL syntax
    By yd29999 in forum Installing on a Windows Server
    Replies: 8
    Last Post: 2 Mar 2007, 05:47 AM

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