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: 2,041

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
9 Jun 2009, 12:03 PM
#1
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

1064 You have an error in your SQL syntax;

This is weird, when I search for things on my site search bar within apostrophes, for example:

'low rise'

I get this error:

**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 'low'&inc_subcat=0&sort=20a', exit_page_name='Advanced Search', num_clicks=num_cl' at line 1
in:
[UPDATE supertracker SET last_click = NOW(), exit_page='/index.php?main_page=advanced_search&search_in_description=1&keyword='low'&inc_subcat=0&sort=20a', exit_page_name='Advanced Search', num_clicks=num_clicks+1, added_cart='false', categories_viewed='b:0;', products_viewed='*265?*453?131?157?', customer_id='0', completed_purchase='false', cart_contents='', cart_total = '0', order_id = '0' WHERE tracking_id='20976']

Anyone got any idea why it does this or how to cure it?

9 Jun 2009, 1:14 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

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

In a standard install of ZC, if you were to search for 'sugar', for example, the search will work and ZC will automatically put slashes in front of the '.

The returned search will show: 'sugar'.

It looks like one of your mods is interfering with this function. Your error says something about supertracker.

Is this a SEO mod?

If so, consider getting rid of it as it's no longer that important to use such SEO mods on dynamic content sites.

9 Jun 2009, 1:23 PM
#3
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

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

Supertracker isn't a SEO mod... I don't use those... it's a brilliant mod for keeping track of site traffic.. I'd hate to have to ditch Supertracker.

Are there any clues in the error above as to how I could modify the mod files so that it behaves the same way ZC does and inserts the // either side of the search?

9 Jun 2009, 1:25 PM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

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

Try getting in touch with the author of supertracker.

9 Jun 2009, 10:12 PM
#5
s_t_e_v_e avatar

s_t_e_v_e

Zen Follower

Join Date:
Aug 2006
Location:
UK
Posts:
430
Plugin Contributions:
0

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

In the forum thread for the supertracker mod, there is somethings about apostrophes and I beleive there is an alteration to the supertracker mod that may help...

9 Jun 2009, 11:32 PM
#6
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

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

s_t_e_v_e:

In the forum thread for the supertracker mod, there is somethings about apostrophes and I beleive there is an alteration to the supertracker mod that may help...

Hi Steve, thanks for the info.. I had a look earlier for a Supertracker support thread.... I couldn't find one but I'll take another look...

10 Jun 2009, 6:35 PM
#7
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

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

s_t_e_v_e:

In the forum thread for the supertracker mod, there is somethings about apostrophes and I beleive there is an alteration to the supertracker mod that may help...

Yes, you're right... there is a patch in the thread above that addresses a few little bugs so it's all fixed now.... Thanks Steve :-)