Notice: Error: 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 ') AND p.status = 1 AND p2s.store_id = '0' GROUP BY op.product_id ORDER BY no_sel' at line 5
Error No: 1064
SELECT op.product_id, SUM(op.quantity) as no_sells FROM oc_order_product op LEFT JOIN oc_product p ON (op.product_id = p.product_id) LEFT JOIN oc_product_to_store p2s ON (op.product_id = p2s.product_id) WHERE op.product_id !='204' AND op.order_id IN (4099,4073,4070,4057,4047,4004,3970,3969,3925,3909,3883,3860,3774,3737,3735,3730,3706,3680,3672,3654,3606,3561,3507,3414,3411,3399,3356,3329,3314,3302,3290,3286,3235,3221,3203,3176,3174,3169,3162,3148,3138,3125,3120,3043,3038,3029,3020,3016,3014,3013,3005,2992,2988,2984,2973,2939,2912,2888,2873,2870,2857,2848,2815,2814,2812,2794,2789,2784,2749,2743,2727,2722,2714,2704,2653,2652,2636,2633,2625,2624,2620,2603,2560,2557,2550,2542,2539,2526,2513,2507,2494,2483,2469,2441,2438,2416,2397,2368,2313,2270,2251,2220,2215,2186,2153,2141,2123,2074,2071,2068,2058,2040,2004,1989,1978,1938,1912,1867,1848,1836,1781,1770,1767,1732,1730,1729,1720,1692,1691,1687,1680,1679,1677,1662,1619,1590,1527,1482,1455,1436,1434,1428,1427,1397,1391,1382,1362,1332,1316,1275,1274,1273,1270,1262,1197,1166,1144,1140,1136,1065,1057,1033,1022,1012,985,981,977,972,927,884,880,877,858,857,821,812,790,772,759,755,738,736,713,712,701,649,643,640,639,628,605,603,585,583,576,565,557,538,537,516,472,468,463,439,429,404,391,362,347,329,325,312,304,248,246,) AND p.status = 1 AND p2s.store_id = '0' GROUP BY op.product_id ORDER BY no_sells DESC LIMIT 0,10 in /home/elanvita/public_html/system/database/mysql.php on line 50