Zen Cart Logo
Forums / General Questions / 1064 You have an error in your SQL syntax;

1064 You have an error in your SQL syntax;

Locked

Views: 4,501

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
16 Apr 2010, 6:36 PM
#1
ndr2010 avatar

ndr2010

New Zenner

Join Date:
Apr 2010
Posts:
9
Plugin Contributions:
0

1064 You have an error in your SQL syntax;

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 '' at line 3
in:
[insert into customers_basket (customers_basket_id, customers_id, products_id, customers_basket_quantity, customers_basket_date_added) values ('','16', ###, '1', '20100416')]

16 Apr 2010, 6:52 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: 1064 You have an error in your SQL syntax;

Check similar threads at the bottom of this post

16 Apr 2010, 7:07 PM
#3
ndr2010 avatar

ndr2010

New Zenner

Join Date:
Apr 2010
Posts:
9
Plugin Contributions:
0

Re: 1064 You have an error in your SQL syntax;

Sorry, already checked all of these and others. They don't resolve the issue. I have restored back-up copies of 1.38 version stores from other websites I know work. Reset database fields individually to allow Nulls just to see if I can pin point it where the breakage is. Added customers_basket_id to the get_terms_to_filter.

None of these resolutions have worked.

And to those who have Pm'd me and replied duplicate post. Please don't. I know it is duplicated. I am not trying to spam the forum, I just don't know where to post the problem because I have seen similar posts in other areas and I didn't see a database errors specific forum.

I really do appreciate help and am not trying to irritate anyone anyone on purpose because I am a programmer and do helpdesk support too and support question forums. But please only reply with suggestions for solutions.

Thanks! :D

16 Apr 2010, 7:14 PM
#4
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: 1064 You have an error in your SQL syntax;

And to those who have Pm'd me and replied duplicate post. Please don't. I know it is duplicated.
So don't duplicate it as this is not condonned on the forum
Post one issue in only one place - donot post the same issue in many places....
It disrupts and causes confising responses from the members of the community

16 Apr 2010, 7:33 PM
#5
ndr2010 avatar

ndr2010

New Zenner

Join Date:
Apr 2010
Posts:
9
Plugin Contributions:
0

Re: 1064 You have an error in your SQL syntax;

So don't duplicate it as this is not condonned on the forum
Post one issue in only one place - donot post the same issue in many places....
It disrupts and causes confising responses from the members of the community

Sorry Kobra, if you read my post, you would notice that it was actually an apology. Not trying to be rude, but I did apologize to those folks for an honest mistake. I am looking for solutions and I do share with others. This actually is not my normal handle. Just haven't been here in six months.

Thanks!

16 Apr 2010, 7:37 PM
#6
drbyte avatar

drbyte

Sensei

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

Re: 1064 You have an error in your SQL syntax;

It looks like you're using an older version of Zen Cart which isn't compatible with MySQL 5.
The query you posted shows that it's trying to insert blanks where blanks are not allowed.
v1.3.8a and newer have corrected code.

16 Apr 2010, 7:39 PM
#7
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: 1064 You have an error in your SQL syntax;

I have restored back-up copies of 1.38 version stores from other websites I know work. Reset database fields individually to allow Nulls just to see if I can pin point it where the breakage is. Added customers_basket_id to the get_terms_to_filter.
Reading this I wonder what you are attempting to do??
Has this ZenCart functioned where it is currently?
Or are you moving it to another server?

You have not provided any of this pertinent information in your OP or subsequent posts leaving us in the forum blind as to what your issue(s) might be and what/where you are in seting this up

16 Apr 2010, 7:40 PM
#8
ndr2010 avatar

ndr2010

New Zenner

Join Date:
Apr 2010
Posts:
9
Plugin Contributions:
0

Re: 1064 You have an error in your SQL syntax;

Ah Huh!!

I think this may be it. I am using 1.38 and downloaded the latest and greatest but noticed my host has me on MySQL 4. I will contact them to upgrade my db.

Thank you so much! :D

16 Apr 2010, 9:14 PM
#9
drbyte avatar

drbyte

Sensei

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

Re: 1064 You have an error in your SQL syntax;

ndr2010:

I think this may be it. I am using 1.38 and downloaded the latest and greatest but noticed my host has me on MySQL 4. I will contact them to upgrade my db.
Um, no, that's not what I said.

I didn't tell you to upgrade your database version. I said you're probably using a newer version of the database than what the PHP code you're running was written for.

Zen Cart 1.3.8a will NOT have the problems you reported unless you've written customizations or added incompatible addons.

19 Apr 2010, 7:31 PM
#10
vyache avatar

vyache

New Zenner

Join Date:
Apr 2010
Posts:
1
Plugin Contributions:
0

Re: 1064 You have an error in your SQL syntax;

I'm having the same issue. I have the latest db and Zen Cart. Hosted on Go Daddy.

Any idea's why ?

19 Apr 2010, 7:36 PM
#11
drbyte avatar

drbyte

Sensei

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

Re: 1064 You have an error in your SQL syntax;

What exactly is the complete error message? And what exact steps are required to trigger the problem?