Thread: SQL Error 1064?

Results 1 to 8 of 8
  1. #1
    Join Date
    Apr 2007
    Posts
    8
    Plugin Contributions
    0

    Default SQL Error 1064?

    This site has been up for about 2 years now and only had 2 issues - the first a few weeks ago when a customer was randomly not charged for shipping. Went it and everytying is set up fine, duplicated the order online and it did calculate shipping. Strange.

    Now today they have a customer that reported getting the following SQL error (again I went in and made a live order and everything was fine, order went thru like a charm with no errors). Can anyone make anything of this error? (I removed some identifying info like address and name):

    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 'Urso [x_company] => [x_address] => 164 9th Ave [x_city] => City' at line 1
    in:
    [insert into zen_authorizenet (id, customer_id,order_id, response_code, response_text, authorization_type, transaction_id, sent, received, time, session_id) values ('', '360', '190', '1', 'This transaction has been approved.', 'auth_capture', '2372239381', '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] => 85.00 [x_card_num] =>
    *******5824 [x_exp_date] => 0511 [x_card_code] => ******* [x_email_customer] => FALSE [x_email_merchant] => TRUE [x_cust_id] => 360 [x_invoice_num] => 190 [x_first_name] => First [x_last_name] => Last [x_company] => [x_address] => 164 9th Ave [x_city] => CITY [x_state] => STATE[x_zip] => ZIP [x_country] => United States [x_phone] => ***-***-5350 [x_email] => marla D'Urso [email protected]_ [x_ship_to_first_name] => First [x_ship_to_last_name] => Last [x_ship_to_address] => 164 9th Ave [x_ship_to_city] => City [x_ship_to_state] => State [x_ship_to_zip] => Zip [x_ship_to_country] => United States [x_description] => Double Chocolate Cookie with Peanut Butter(qty: 1) [Date] => April 2, 2009,
    10:04 am [IP] => 74.201.xxx.3 [Session] => 1bfc3fc8b1407d99f79113b2e2c1491d [url] => https://secure.authorize.net/gateway/transact.dll ) ',
    '1=1&2=1&3=1&4=This+transaction+has+been+approved.&5=594356&6=Y&7=2372239381
    &8=190&9=Double+Chocolate+Cookie+with+Peanut+Butter%28qty%3A+1%29&10=85.00&1
    1=CC&12=auth_capture&13=360&14=Marla&15=D%27Urso&16=&17=164+9th+Ave&18=New+Y
    ork&19=New+York&20=10011&21=United+States&22=917-670-5350&23=&24=marla+D%27U
    rso+_mgwen%40nyc.rr.com_&25=Marla&26=Durso&27=&28=164+9th+Ave&29=New+Yor
    rso+k&30
    =New+York&31=10011&32=United+States&33=&34=&35=&36=&37=&38=52E0DC57F661FB6BF
    0E67FD2959B65D7&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=April+2+2009
    +10%3A04+am&70=74.201.160.3&71=1bfc3fc8b1407d99f79113b2e2c1491d',
    'April 2, 2009, 10:04 am', '1bfc3fc8b1407d99f79113b2e2c1491d')]

  2. #2
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: SQL Error 1064?

    You appear to be using an old version of Zen Cart. Which version are you using?
    .

    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
    Apr 2007
    Posts
    8
    Plugin Contributions
    0

    Default Re: SQL Error 1064?

    Sorry I didn't post that the first time - it's not the newest version but it is v1.3.7

  4. #4
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: SQL Error 1064?

    It's breaking on the quote mark, and there was a bug up to v1.3.7.1 that was fixed in v1.3.8 to deal with that.
    The updated version (for v1.3.7) attached to this post should address the problem with quote (') marks entered by customers or in product descriptions:
    http://www.zen-cart.com/forum/showth...023#post441023 ... this is one of several discussions related to the quotation mark and other symbols that needed cleanup before storing into the database.
    .

    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.

  5. #5
    Join Date
    Apr 2007
    Posts
    8
    Plugin Contributions
    0

    Default Re: SQL Error 1064?

    That must be it - there was a quote - here is the actual start of the 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 'Urso [x_company] => [x_address] => 164 9th Ave [x_city] => New York' at line 1
    in:

    Notice the quote after New York. As far as the link you sent, are you saying to grap the zip file and overwrite those current files in the system (won't break anything?)

  6. #6
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: SQL Error 1064?

    As with any patch, especially short-term fixes such as this one, you should ALWAYS backup the existing files and then upload the updated version after being sure that it was built for the version of Zen Cart you're using.
    .

    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.

  7. #7
    Join Date
    Apr 2007
    Posts
    8
    Plugin Contributions
    0

    Default Re: SQL Error 1064?

    Will do - just to be clear you are saying these files SHOULD work for v 1.3.7 right?

    Thanks for your help!

  8. #8
    Join Date
    Jan 2004
    Posts
    66,450
    Plugin Contributions
    81

    Default Re: SQL Error 1064?

    I made that zip based on 1.3.7 code while building the v1.3.8 updates, so, yes.
    .

    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. Replies: 1
    Last Post: 25 Aug 2011, 05:58 AM
  2. Error message 1064 you have an error in your sql syntax
    By honrheart in forum General Questions
    Replies: 1
    Last Post: 11 Sep 2009, 02:38 AM
  3. SQL Error 1064??
    By sethererm in forum General Questions
    Replies: 15
    Last Post: 25 Jul 2008, 04:40 PM
  4. SQL error 1064??
    By paperzombie in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 23 Jan 2008, 06:24 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