Forums / General Questions / Getting a SQL error on On "All products" for a category

Getting a SQL error on On "All products" for a category

Views: 451

Results 1 to 2 of 2
8 May 2013, 10:30 AM
#1
atp29awr avatar

atp29awr

New Zenner

Join Date:
Apr 2013
Location:
India
Posts:
36
Plugin Contributions:
0

Getting a SQL error on On "All products" for a category

Hello,

I am seeing an error on one of the sections "All Products" related to the product category. I have a category tab as "Spiritual" in the menu. Under this is "All Products". When I click on this "All Products" tab, I see 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 'order by p.products_date_added DESC, pd.products_name LIMIT 120' at line 1
in:
[ order by p.products_date_added DESC, pd.products_name LIMIT 120]

I tried to check for "p.products_date_added" using the developer tool kit , I got it in

/html/includes/functions/functions_lookups.php

It showed me this:

Line #848 : $display_limit = " and date_format(p.products_date_added, '%Y%m') >= date_format(now(), '%Y%m')";

Line #851 : $display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 7';

Line #854 : $display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 14';

Line #857 : $display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 30';

Line #860 : $display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 60';

Line #863 : $display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 90';

Line #866 : $display_limit = ' and TO_DAYS(NOW()) - TO_DAYS(p.products_date_added) <= 120';

Line #914 : $new_range = ' and p.products_date_added >=' . $zc_new_date;

Line #917 : $new_range = ' and p.products_date_added >=' . $zc_new_date;

Kindly let me know what needs to done. Thanks a lot

8 May 2013, 11:30 AM
#2
atp29awr avatar

atp29awr

New Zenner

Join Date:
Apr 2013
Location:
India
Posts:
36
Plugin Contributions:
0

Re: Getting a SQL error on On "All products" for a category

Please help me in the issue. I do not want customers to see this error. Thanks!