
Originally Posted by
nguyenkhv
Hello all,
I have installed the mod and it seems to work fine with or without the Cross Sell mod. Only when I add item number 13th into the shopping cart, I got this error. Please help. I have zen cart version 1.3.8a .
--------------------
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 27
in:
[(select p.products_id, p.products_image from orders_products opa, orders_products opb, orders o, products p where opa.products_id = '7045' and opa.orders_id = opb.orders_id and opb.products_id != '7045' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit 2) UNION (select p.products_id, p.products_image from orders_products opa, orders_products opb, orders o, products p where opa.products_id = '7044' and opa.orders_id = opb.orders_id and opb.products_id != '7044' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit 2) UNION (select p.products_id, p.products_image from orders_products opa, orders_products opb, orders o, products p where opa.products_id = '7043' and opa.orders_id = opb.orders_id and opb.products_id != '7043' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit 2) UNION (select p.products_id, p.products_image from orders_products opa, orders_products opb, orders o, products p where opa.products_id = '7042' and opa.orders_id = opb.orders_id and opb.products_id != '7042' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit 2) UNION (select p.products_id, p.products_image from orders_products opa, orders_products opb, orders o, products p where opa.products_id = '7041' and opa.orders_id = opb.orders_id and opb.products_id != '7041' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit 2) UNION (select p.products_id, p.products_image from orders_products opa, orders_products opb, orders o, products p where opa.products_id = '7037' and opa.orders_id = opb.orders_id and opb.products_id != '7037' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit 2) UNION (select p.products_id, p.products_image from orders_products opa, orders_products opb, orders o, products p where opa.products_id = '7005' and opa.orders_id = opb.orders_id and opb.products_id != '7005' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit 2) UNION (select p.products_id, p.products_image from orders_products opa, orders_products opb, orders o, products p where opa.products_id = '6726' and opa.orders_id = opb.orders_id and opb.products_id != '6726' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit 2) UNION (select p.products_id, p.products_image from orders_products opa, orders_products opb, orders o, products p where opa.products_id = '6357' and opa.orders_id = opb.orders_id and opb.products_id != '6357' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit 2) UNION (select p.products_id, p.products_image from orders_products opa, orders_products opb, orders o, products p where opa.products_id = '6514' and opa.orders_id = opb.orders_id and opb.products_id != '6514' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit 2) UNION (select p.products_id, p.products_image from orders_products opa, orders_products opb, orders o, products p where opa.products_id = '6728' and opa.orders_id = opb.orders_id and opb.products_id != '6728' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit 2) UNION (select p.products_id, p.products_image from orders_products opa, orders_products opb, orders o, products p where opa.products_id = '6701' and opa.orders_id = opb.orders_id and opb.products_id != '6701' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit 2) UNION (select p.products_id, p.products_image from orders_products opa, orders_products opb, orders o, products p where opa.products_id = '6777' and opa.orders_id = opb.orders_id and opb.products_id != '6777' and opb.products_id = p.products_id and opb.orders_id = o.orders_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc: