Forums / General Questions / Oops! 1064 You have an error in your SQL syntax when clicking "New Products"

Oops! 1064 You have an error in your SQL syntax when clicking "New Products"

Locked

Started by dysfunctional on 16 Sep 2009, 4:59 PM · Views: 834

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
16 Sep 2009, 4:59 PM
#1
dysfunctional avatar

dysfunctional

Zen Follower

Join Date:
Apr 2008
Posts:
159
Plugin Contributions:
0

Oops! 1064 You have an error in your SQL syntax when clicking "New Products"

Just noticed a really ugly error in my shop...

This used to work before. Don't know what I might have done to cause this error. I've googled but not found the exact solution for my case.

Here's the problem :

When I click "New Products" in my store, I get the following 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 '-0, 0' at line 11
in:
[SELECT p.products_id, p.products_type, pd.products_name, p.products_image, p.products_price, p.products_tax_class_id, p.products_date_added, m.manufacturers_name, p.products_model, p.products_quantity, p.products_weight, p.product_is_call, p.product_is_always_free_shipping, p.products_qty_box_status, p.master_categories_id FROM zen_products p LEFT JOIN zen_manufacturers m ON (p.manufacturers_id = m.manufacturers_id), zen_products_description pd WHERE p.products_status = 1 AND p.products_id = pd.products_id AND pd.language_id = 1 order by p.products_date_added DESC, pd.products_name limit -0, 0]

The shop is located at https://www.crashdiet.org/webshop

Was suppose to make the shop official tonight, so it would be awesome with some guidence here :) thanks alot in advance

best regards

peter

16 Sep 2009, 5:11 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Oops! 1064 You have an error in your SQL syntax when clicking "New Products"

Admin->Configuration->Maximum Values. Most values in that list should not be 0 unless you have a very specific reason for doing so. Chances are you've got something related to New Products set to 0.

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

16 Sep 2009, 5:15 PM
#3
dysfunctional avatar

dysfunctional

Zen Follower

Join Date:
Apr 2008
Posts:
159
Plugin Contributions:
0

Re: Oops! 1064 You have an error in your SQL syntax when clicking "New Products"

Wow, thanks for sharing your knowledge. Yeah, it was set to "0". Corrected now. Thank you!