Results 1 to 8 of 8
  1. #1
    Join Date
    Dec 2006
    Posts
    189
    Plugin Contributions
    0

    Default 1064 ERROR when trying to edit customers account

    While trying to change the email address on a customers account from the Admin, I received the following error message:

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

    Where would I correct this? Also, I'm using the current version 1.37 of Zencart.

    Thanks for your help

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

    Default Re: 1064 ERROR when trying to edit customers account

    Sounds like you've installed some sort of contribution that has modified the /admin/customers.php file incorrectly.
    .

    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
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: 1064 ERROR when trying to edit customers account

    In your admin/customers.php file,

    find:

    PHP Code:
    where customers_email_address '" . zen_db_input($customers_email_address) . "' 
    replace with:

    PHP Code:
    where customers_email_address '" . zen_db_output($customers_email_address) . "' 
    This will correct the issue.

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

    Default Re: 1064 ERROR when trying to edit customers account

    Huh?
    How?

    The query shown in the original post has PHP code mixed inside the SQL query.

    I don't see how your suggestion to change from a zen_db_input() function call to a zen_db_output() function call has any relevance here ...

    Quote Originally Posted by Robbyn7 View Post
    [select customers_email_address from zen_customers where customers_email_address = 'REMOVED######################' if (() > 0) { and customers_id != '6']
    .

    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
    Aug 2004
    Posts
    1,590
    Plugin Contributions
    1

    Default Re: 1064 ERROR when trying to edit customers account

    Forgot one part.

    The > 0 part is a RecordCount issue. Place an isset before the actual validation of the email inside the if statement. This should correct the problem as well.

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

    Default Re: 1064 ERROR when trying to edit customers account

    Did anyone come up with a resolution to this?

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

    Default Re: 1064 ERROR when trying to edit customers account

    You said you're using Zen Cart v1.3.7.

    What addons/contributions have you installed?
    Was this an upgrade from a prior version? Which version?
    If you replace your /admin/customers.php file with the original one from the v1.3.7 zip file, do things work better now?
    .

    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.

  8. #8
    Join Date
    Dec 2006
    Posts
    189
    Plugin Contributions
    0

    Default Re: 1064 ERROR when trying to edit customers account

    Thanks for the reply.

    I'm using the current version 1.37. It was a clean install, no upgrades.

    The last mod installed was the Return Authorization Module.

    When I compared my admin/customers.php with the original zip file, everything was the same.

    Thanks for all your help.

 

 

Similar Threads

  1. 1064 error when trying to send customer email/newsletter
    By lj20272 in forum General Questions
    Replies: 14
    Last Post: 27 Aug 2012, 08:43 AM
  2. Error 1064 when searching customers orders
    By edvon in forum General Questions
    Replies: 3
    Last Post: 1 Mar 2011, 10:29 PM
  3. 1064 syntax error when creating account
    By mayleine in forum General Questions
    Replies: 3
    Last Post: 2 Jan 2011, 11:31 AM
  4. Replies: 2
    Last Post: 4 Jun 2010, 07:01 AM
  5. Customers get a blank screen when trying to create an account
    By semansr in forum Templates, Stylesheets, Page Layout
    Replies: 6
    Last Post: 13 Apr 2009, 10:13 PM

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