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 !='180' AND op.order_id IN (3004,2997,2995,2991,2989,2986,2978,2953,2950,2946,2940,2939,2915,2908,2884,2879,2862,2855,2845,2828,2818,2785,2779,2778,2766,2753,2735,2700,2693,2690,2664,2662,2605,2602,2595,2587,2559,2530,2529,2525,2520,2491,2480,2465,2463,2423,2417,2407,2388,2371,2323,2314,2278,2271,2265,2258,2214,2194,2191,2162,2145,2134,2113,2091,2078,2031,2019,1999,1993,1992,1987,1981,1926,1924,1902,1899,1866,1862,1851,1826,1820,1804,1798,1797,1779,1776,1771,1762,1756,1752,1747,1743,1711,1706,1701,1693,1685,1682,1665,1659,1645,1611,1607,1600,1599,1588,1583,1578,1577,1570,1554,1547,1544,1524,1521,1514,1512,1510,1465,1453,1444,1430,1427,1421,1400,1395,1349,1344,1329,1326,1324,1298,1289,1283,1271,1258,1257,1252,1251,1242,1236,1229,1228,1218,1186,1178,1163,1157,1154,1147,1130,1119,1117,1093,1088,1083,1071,1061,1058,1046,1031,1025,1015,1014,968,950,949,932,925,917,901,889,868,836,826,801,793,765,747,746,654,644,633,613,595,584,574,554,552,523,513,484,469,455,444,436,435,434,431,414,401,384,374,356,354,337,297,294,293,287,283,265,258,255,235,) 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