Forums / Managing Customers and Orders / When I click on EDIT for a customer under Admin I get a SQL error

When I click on EDIT for a customer under Admin I get a SQL error

Locked

Views: 1,171

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
3 Dec 2008, 7:22 PM
#1
mheishman avatar

mheishman

New Zenner

Join Date:
Nov 2008
Posts:
29
Plugin Contributions:
0

When I click on EDIT for a customer under Admin I get a SQL error

When I click on Customers and then select EDIT I receive 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 '// c.customers_newsletter, c.customers_default_address_id, ' at line 6
in:
[select c.customers_id, c.customers_gender, c.customers_firstname, c.customers_lastname, c.customers_dob, c.customers_email_address, a.entry_company, a.entry_street_address, a.entry_suburb, a.entry_postcode, a.entry_city, a.entry_state, a.entry_zone_id, a.entry_country_id, c.customers_telephone, c.customers_fax, // c.customers_newsletter, c.customers_default_address_id, c.customers_email_format, c.customers_group_pricing, c.customers_authorization, c.customers_referral from zen_customers c left join zen_address_book a on c.customers_default_address_id = a.address_book_id where a.customers_id = c.customers_id and c.customers_id = '3'] *

My versions are:
phpMyAdmin - 2.11.9.1
MySQL client version: 4.1.22
Zen Cart 1.3.8a

I see the tables zen_customers and zen_address_book, but don't understand the error message entirely in order to fix the problem. Also, I know that this query can be found in /admin/customers.php. Is this where I need to fix, or in PHPMyAdmin??

I have only one customer (myself) that I created as a test.

3 Dec 2008, 7:26 PM
#2
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: When I click on EDIT for a customer under Admin I get a SQL error

From phpMyAdmin, can you export the CONTENTS of the tables? Look for odd characters.

3 Dec 2008, 7:39 PM
#3
edadk avatar

edadk

Zen Follower

Join Date:
Nov 2008
Posts:
191
Plugin Contributions:
0

Re: When I click on EDIT for a customer under Admin I get a SQL error

The error message is showing 2 slashes in the select statement.

Check your source code to see if those slashes are in the code in your customers.php. If so, try removing them. Back up your source file before making any changes.

Ed

3 Dec 2008, 8:41 PM
#4
mheishman avatar

mheishman

New Zenner

Join Date:
Nov 2008
Posts:
29
Plugin Contributions:
0

Re: When I click on EDIT for a customer under Admin I get a SQL error

:clap:

Okay, doing a search through the customers.php I saw where the // were and removed them. I now do not have an error message. I saw the // in the sql and thought that was strange...Thank you!