Zen Cart Logo
Forums / Customization from the Admin / 1064 ERROR when trying to edit customers account

1064 ERROR when trying to edit customers account

Locked

Views: 1,632

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
14 Jun 2007, 11:00 PM
#1
robbyn7 avatar

robbyn7

Zen Follower

Join Date:
Dec 2006
Posts:
187
Plugin Contributions:
0

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 = '[email protected]' 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

15 Jun 2007, 2:45 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

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.

15 Jun 2007, 3:11 AM
#3
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: 1064 ERROR when trying to edit customers account

In your admin/customers.php file,

find:

where customers_email_address = '" . zen_db_input($customers_email_address) . "'

replace with:

where customers_email_address = '" . zen_db_output($customers_email_address) . "'

This will correct the issue.

15 Jun 2007, 3:36 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

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 ...

Robbyn7:

[select customers_email_address from zen_customers where customers_email_address = '[email protected]' ** if (() > 0) { ** and customers_id != '6']

15 Jun 2007, 3:53 AM
#5
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

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.

18 Jun 2007, 3:55 AM
#6
robbyn7 avatar

robbyn7

Zen Follower

Join Date:
Dec 2006
Posts:
187
Plugin Contributions:
0

Re: 1064 ERROR when trying to edit customers account

Did anyone come up with a resolution to this?

18 Jun 2007, 4:48 AM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

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?

19 Jun 2007, 2:17 PM
#8
robbyn7 avatar

robbyn7

Zen Follower

Join Date:
Dec 2006
Posts:
187
Plugin Contributions:
0

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.