Got this error when I tried to add 13 products
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 '-1)' at line 1
in:
[(select p.products_id, p.products_image from widgetproducts_xsell xp, widgetproducts p, widgetproducts_description pd where xp.products_id = '31' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from widgetproducts_xsell xp, widgetproducts p, widgetproducts_description pd where xp.products_id = '99' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from widgetproducts_xsell xp, widgetproducts p, widgetproducts_description pd where xp.products_id = '86' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from widgetproducts_xsell xp, widgetproducts p, widgetproducts_description pd where xp.products_id = '94' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from widgetproducts_xsell xp, widgetproducts p, widgetproducts_description pd where xp.products_id = '9' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from widgetproducts_xsell xp, widgetproducts p, widgetproducts_description pd where xp.products_id = '100' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from widgetproducts_xsell xp, widgetproducts p, widgetproducts_description pd where xp.products_id = '12' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from widgetproducts_xsell xp, widgetproducts p, widgetproducts_description pd where xp.products_id = '11' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from widgetproducts_xsell xp, widgetproducts p, widgetproducts_description pd where xp.products_id = '91' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from widgetproducts_xsell xp, widgetproducts p, widgetproducts_description pd where xp.products_id = '90' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from widgetproducts_xsell xp, widgetproducts p, widgetproducts_description pd where xp.products_id = '81' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from widgetproducts_xsell xp, widgetproducts p, widgetproducts_description pd where xp.products_id = '8' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit 2) UNION (select p.products_id, p.products_image from widgetproducts_xsell xp, widgetproducts p, widgetproducts_description pd where xp.products_id = '13' and xp.xsell_id = p.products_id and p.products_id = pd.products_id and pd.language_id = '1' and p.products_status = '1' order by xp.products_id asc limit -1)]






Bookmarks