Can not execute database query. Please contact site administrator.
2014-11-21T05:00:58-05:00

SELECT
products.*,
IF(products.url_custom='',products.url_default,products.url_custom) AS product_url,
catalog.name AS cat_name,
IF(catalog.url_custom='',catalog.url_default,catalog.url_custom) AS cat_url,
SUM(orders_content.admin_price * orders_content.admin_quantity) AS product_amount,
SUM(orders_content.admin_quantity) AS product_quantity
FROM orders_content
INNER JOIN orders ON orders.oid=orders_content.oid
INNER JOIN products ON products.pid = orders_content.pid

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


Got error 28 from storage engine