Notice: Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB 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 order_product op LEFT JOIN product p ON (op.product_id = p.product_id) LEFT JOIN product_to_store p2s ON (op.product_id = p2s.product_id) WHERE op.product_id !='179' AND op.order_id IN (2050,2014,2001,1984,1951,1932,1919,1899,1895,1880,1876,1858,1853,1850,1849,1846,1844,1840,1835,1820,1798,1786,1778,1776,1770,1760,1751,1734,1693,1691,1686,1681,1672,1668,1666,1664,1643,1642,1629,1620,1616,1614,1611,1606,1595,1584,1579,1572,1564,1559,1545,1534,1532,1528,1525,1514,1511,1496,1478,1459,1453,1438,1436,1426,1423,1405,1404,1393,1392,1391,1389,1374,1369,1367,1361,1355,1349,1346,1345,1340,1338,1337,1336,1326,1325,1322,1317,1315,1311,1310,1302,1297,1296,1287,1280,1273,1264,1225,1215,1214,1212,1208,1195,1176,1167,1137,1127,1123,1118,1085,1076,1064,1013,1010,1008,1006,982,977,970,968,948,946,940,938,934,930,927,922,919,916,906,905,904,902,901,880,874,873,869,857,854,851,845,842,841,839,833,832,831,829,828,818,813,809,784,774,773,762,733,719,648,646,636,633,630,628,622,617,615,610,607,605,604,599,598,597,592,590,588,587,586,581,580,579,578,577,571,570,567,566,565,563,556,554,553,551,546,543,540,538,537,536,534,533,532,531,529,518,516,513,510,509,505,495,493,489,470,465,449,448,445,443,442,439,408,398,267,) AND p.status = 1 AND p2s.store_id = '0' GROUP BY op.product_id ORDER BY no_sells ASC LIMIT 0,16 in /home/peterm1b/public_html/shop/system/database/mysql.php on line 49