SELECT webshop_products.*, webshop_products.id AS id, i.name AS pri_image, pi.id AS pri_image_id, wu.name AS unit_name, GROUP_CONCAT(pt.tag_id SEPARATOR ',') AS tags_id FROM `webshop_products` LEFT JOIN `webshop_units` AS wu ON webshop_products.unit_id=wu.id LEFT JOIN `webshop_product_tags` AS pt ON pt.product_id=webshop_products.identifier_id LEFT JOIN `webshop_product_images` AS pi ON webshop_products.identifier_id=pi.product_id LEFT JOIN `images` AS i ON pi.image_id=i.id WHERE `webshop_products`.`hide`!='1' AND (pi.primary_img='1' OR pi.id IS NULL) AND (webshop_products.identifier_id IN (SELECT pt.product_id FROM webshop_product_tags AS pt LEFT JOIN webshop_tags AS t ON t.id=pt.tag_id WHERE t.tag IN('ipadmini4') OR t.id IN ('ipadmini4')) AND webshop_products.identifier_id IN (SELECT pt.product_id FROM webshop_product_tags AS pt LEFT JOIN webshop_tags AS t ON t.id=pt.tag_id WHERE t.tag IN('tools') OR t.id IN ('tools'))) AND `category1` IN('574') AND `language_id`='1' GROUP BY webshop_products.identifier_id ORDER BY IF(`special_price` > 0 AND `special_price` < `internet_price`, `special_price`, `internet_price`) ASC, order_by DESC LIMIT 0 , 42 : Got error 28 from storage engine