Page 1 of 3 123 LastLast
Results 1 to 10 of 21
  1. #1
    Join Date
    Oct 2005
    Location
    Finland
    Posts
    186
    Plugin Contributions
    1

    Default 1064 sql error after confirming order

    After confirming in step 3 in the checkout process I get this error:

    Code:
    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 '000000 where products_id = '11'' at line 1
    in:
    [update zen_products set products_ordered = products_ordered + 1,000000 where products_id = '11']

    Zen Cart 1.3.0.1
    Database Patch Level 1.3.0.1

    MySQL 4.1.9-nt
    Apache/2.0.52 (Unix)
    PHP 4.3.10

    Anyone who know what causes this?

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

    Default Re: 1064 sql error after confirming order

    The "+ 1,000000 " part is what's causing the problem.

    a. What addons have you installed, or what modifications have you made?
    b. What are your currency settings for your default currency?
    .

    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
    May 2006
    Posts
    24
    Plugin Contributions
    0

    Default Re: 1064 sql error after confirming order

    I get this error:
    1064 You have an error in your SQL syntax near '(address_book ab left join zones z on (ab.en' at line 7
    in:
    [select c.customers_firstname, c.customers_lastname, c.customers_telephone, c.customers_email_address, ab.entry_company, ab.entry_street_address, ab.entry_suburb, ab.entry_postcode, ab.entry_city, ab.entry_zone_id, z.zone_name, co.countries_id, co.countries_name, co.countries_iso_code_2, co.countries_iso_code_3, co.address_format_id, ab.entry_state from customers c, (address_book ab left join zones z on (ab.entry_zone_id = z.zone_id) left join countries co on (ab.entry_country_id = co.countries_id) ) where c.customers_id = '1' and ab.customers_id = '1' and c.customers_default_address_id = ab.address_book_id]


    Please help !!

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

    Default Re: 1064 sql error after confirming order

    Upgrade to Zen Cart v1.3.0.1 ... the current version ... with a few bugfixes added to it such as this one ...
    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!

  5. #5
    Join Date
    May 2006
    Posts
    24
    Plugin Contributions
    0

    Default Re: 1064 sql error after confirming order

    I already have version Zen Cart 1.3.0

    Eran

  6. #6
    Join Date
    Sep 2005
    Posts
    8
    Plugin Contributions
    0

    Default Re: 1064 sql error after confirming order

    I have 1.3.0.2 and the same problem:

    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 '000000 where products_id = '242'' at line 1
    in:
    [update shop_2_products set products_ordered = products_ordered + 1,000000 where products_id = '242']

    How can be resolved problem with "+ 1,000000". I use Czech language (win-1250) with thousands separator "." and decimal point ",". It was always functional. Also language setting were always ok.

  7. #7
    Join Date
    Sep 2005
    Posts
    8
    Plugin Contributions
    0

    Idea or Suggestion Re: 1064 sql error after confirming order

    I found solution.

    When I changed in /includes/classes/order.php SQL command on row 670 from:

    $db->Execute("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%f', $this->products[$i]['qty']) . " where products_id = '" . zen_get_prid($this->products[$i]['id']) . "'");

    to:

    $db->Execute("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%d', $this->products[$i]['qty']) . " where products_id = '" . zen_get_prid($this->products[$i]['id']) . "'");

    then the order is completed ok. Importand was string %f changed to %d

    I hope it will help to others.

    - Noface -

  8. #8
    Join Date
    Aug 2006
    Posts
    8
    Plugin Contributions
    0

    Default Re: 1064 sql error after confirming order

    Quote Originally Posted by noface
    I found solution.

    When I changed in /includes/classes/order.php SQL command on row 670 from:

    $db->Execute("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%f', $this->products[$i]['qty']) . " where products_id = '" . zen_get_prid($this->products[$i]['id']) . "'");

    to:

    $db->Execute("update " . TABLE_PRODUCTS . " set products_ordered = products_ordered + " . sprintf('%d', $this->products[$i]['qty']) . " where products_id = '" . zen_get_prid($this->products[$i]['id']) . "'");

    then the order is completed ok. Importand was string %f changed to %d

    I hope it will help to others.

    - Noface -
    This Solution dont work for me, I have reinstalled and still not working, where is the patch to update my 1.3.0.1 to 1.3.0.3 ? can`t find it

    Fresh install today..

  9. #9
    Join Date
    Sep 2005
    Posts
    8
    Plugin Contributions
    0

    Default Re: 1064 sql error after confirming order

    1.3.0.3? I am using 1.3.0.2. Two days ago I upgrade previous 1.2.6d. This solution ('%f' changed to '%d') is working with no error.

  10. #10
    Join Date
    Aug 2006
    Posts
    8
    Plugin Contributions
    0

    Default Re: 1064 sql error after confirming order

    Hello,

    Sorry I am very new to this only installed the shop today, i mean 1.3.0.1 and what i mean to ask where do i upgrade to 1.3.0.2 then I can try your solution propely,

    Kindest of Regards.

 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 25 Aug 2011, 05:58 AM
  2. Replies: 3
    Last Post: 21 Sep 2008, 12:45 AM
  3. Authorize.net AIM - HASH error after confirming order
    By TJB in forum Built-in Shipping and Payment Modules
    Replies: 1
    Last Post: 5 Mar 2008, 10:13 PM
  4. SQL 1064 error completing an order
    By hughesenergy in forum General Questions
    Replies: 4
    Last Post: 21 Jan 2008, 09:10 PM
  5. error 1064 after client completed order.
    By cristaltech in forum Managing Customers and Orders
    Replies: 8
    Last Post: 15 May 2007, 04:21 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