Can not execute database query. Please contact site administrator.
2014-04-21T01:17:01-06:00

SELECT
pi_products.*,
IF(pi_products.url_custom='',pi_products.url_default,pi_products.url_custom) AS product_url,
pi_catalog.name AS cat_name,
IF(pi_catalog.url_custom='',pi_catalog.url_default,pi_catalog.url_custom) AS cat_url,
SUM(pi_orders_content.admin_price * pi_orders_content.admin_quantity) AS product_amount,
SUM(pi_orders_content.admin_quantity) AS product_quantity
FROM pi_orders_content
INNER JOIN pi_orders ON pi_orders.oid=pi_orders_content.oid
INNER JOIN pi_products ON pi_products.pid = pi_orders_content.pid

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


Got error 28 from storage engine