• QUERY RESULT: 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 'GROUP BY P.id ORDER BY P.date_added DESC, product_order' at line 12 for query SELECT P.id AS "ID", P.name, P.short_description, P.price, P.sale, IF(P.sale>0,1,0) AS "sale_item", IF(DATEDIFF(NOW(),P.date_added) <= "0", 1, 0) AS "new_item", sales_rank, IF(P.sale > 0, P.sale, P.price) AS "price_sort" FROM forkspoon_store.products AS P LEFT JOIN (SELECT P.id AS "product_id", COALESCE(SUM(amt),0) AS "total_ordered", @order := @order+1 AS "sales_rank" FROM (SELECT @order:=0)r, forkspoon_store.products AS P LEFT JOIN forkspoon_store.order_items AS OI ON OI.product_id = P.id GROUP BY P.id ORDER BY total_ordered DESC) AS OI ON OI.product_id=P.id WHERE P.active=1 AND P.pclass="store" AND P.hidden = 0 HAVING sales_rank / 248 <= 0.25 GROUP BY P.id ORDER BY P.date_added DESC, product_order
Total Results: 0

Empty Result

No Products were found matching that description