Can not execute database query. Please contact site administrator.
2018-01-18T08:51:17-07:00

SELECT
cheryl_products.*,
IF(cheryl_products.url_custom='',cheryl_products.url_default,cheryl_products.url_custom) AS product_url,
cheryl_catalog.name AS cat_name,
IF(cheryl_catalog.url_custom='',cheryl_catalog.url_default,cheryl_catalog.url_custom) AS cat_url,
SUM(cheryl_orders_content.admin_price * cheryl_orders_content.admin_quantity) AS product_amount,
SUM(cheryl_orders_content.admin_quantity) AS product_quantity
FROM cheryl_orders_content
INNER JOIN cheryl_orders ON cheryl_orders.oid=cheryl_orders_content.oid
INNER JOIN cheryl_products ON cheryl_products.pid = cheryl_orders_content.pid

INNER JOIN cheryl_catalog ON cheryl_catalog.cid = cheryl_products.cid
WHERE
cheryl_catalog.key_name <> 'gift_cert' AND
cheryl_products.is_visible='Yes' AND
DATE_ADD(cheryl_orders.placed_date, INTERVAL 2 MONTH)>NOW() AND
cheryl_orders.status='Completed' AND
cheryl_orders.payment_status='Received'
GROUP BY cheryl_orders_content.pid
ORDER BY
product_quantity DESC
LIMIT 7


Got error 28 from storage engine