Page 3 of 3 FirstFirst 123
Results 21 to 27 of 27
  1. #21
    Join Date
    Apr 2007
    Location
    Rustenburg, South Africa
    Posts
    85
    Plugin Contributions
    0

    Default Re: Error 1064 and other

    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 'where customer_id=28' at line 1
    in:
    [update zen_sc_customer set amount = amount - where customer_id=28]

    here is the error code

  2. #22
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Error 1064 and other

    Quote Originally Posted by cristaltech View Post
    [update zen_sc_customer set amount = amount - where customer_id=28]
    I'm trying to find anything in Zen Cart that runs such a query, but can't find any.

    1. zen_sc_customer is the table name it's attempting to update.
    Zen Cart has a table named "customers" and "coupon_gv_customer", but nothing called "customer" or "sc_customer".
    This tells me whatever is causing your error is from an addon you've installed.

    2. The actual problem is that it appears to be attempting to set "amount" to zero, but likely is using an uninitialized variable that's set to '' instead of '0', and thus is inserting a blank string for the new "amount" value.
    It would be prudent to insert (int) before the variable name ... whenever you can find out which line of code in the contribution is causing this. That'll force the '' value to be converted to '0', thus getting around the error.
    ie:
    Code:
    ...  set amount = amount - #### where ...
    (with #### being the value to reduce "amount" by.)
    .

    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. #23
    Join Date
    Apr 2007
    Location
    Rustenburg, South Africa
    Posts
    85
    Plugin Contributions
    0

    Default Re: Error 1064 and other

    I found the string that cause the error. It was the dual pricing I added, but later removed. The SQL string however was not removed: Here it is:
    ALTER TABLE `customers` ADD `customers_whole` VARCHAR( 4 ) DEFAULT '0' NOT NULL;
    ALTER TABLE `products` ADD `products_price_w` VARCHAR( 150 ) DEFAULT '0' AFTER `products_price`;
    ALTER TABLE `products_attributes` ADD `options_values_price_w` VARCHAR( 150 ) DEFAULT '0' AFTER `options_values_price`;

    I have removed it, but after I have entered the order, it immediately re-directs me to the main page with an message that my shopping cart is empty although the order is completed and the confirmation email was send.

    Could I maybe just change the above and re-insert it ??

  4. #24
    Join Date
    Apr 2007
    Location
    Rustenburg, South Africa
    Posts
    85
    Plugin Contributions
    0

    Default Re: Error 1064 and other

    Dr. Byte, I also see that you have knowledge of the dual pricing for wholesale prices. The above sql code is derived from there. I could never get it worked and started to use group pricing instead. I also make use of profit margin inside the order totals. Can you help me to use this module instead of using group pricing ???

  5. #25
    Join Date
    Apr 2007
    Location
    Rustenburg, South Africa
    Posts
    85
    Plugin Contributions
    0

    Default Re: Error 1064 and other

    I got it sorted out thanks, I have re-entered the SQL script default to 1 and not 0. My shopping cart eventually works. Thanks for the tip on the added extensions. It help a lot.

  6. #26
    Join Date
    Dec 2006
    Posts
    189
    Plugin Contributions
    0

    Default Re: Error 1064 and other

    Can someone help with this 1064 error. It occurs when I attempt to edit a customers account information in Admin.

    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 'if (() > 0) { and customers_id != '3'' at line 4
    in:
    [select customers_email_address from zen_customers where customers_email_address = '######################' if (() > 0) { and customers_id != '3']
    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.


    Thanks for any help.

  7. #27
    Join Date
    Apr 2007
    Location
    Rustenburg, South Africa
    Posts
    85
    Plugin Contributions
    0

    Default Re: Error 1064 and other

    The above is related to the module: store credit. I have upgraded to ver 0.0.4 and it solved the problem.

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. Comm error and Security Hash Error. Other threads r no help :(
    By tysty7 in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 22 Aug 2011, 10:18 PM
  2. Fatal error: Class 'notifier' not found and other error
    By mjfan80 in forum Installing on a Linux/Unix Server
    Replies: 8
    Last Post: 24 Apr 2009, 12:39 PM
  3. Error 1064, but my page loads... and can't access admin...
    By alternatykes in forum Installing on a Windows Server
    Replies: 1
    Last Post: 6 Apr 2009, 07:19 PM
  4. error message 1064-newsletters and product notification
    By SweatingItOut in forum General Questions
    Replies: 2
    Last Post: 18 Aug 2008, 10:57 AM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR