Table './shop/SS_product_options_values' is marked as crashed and should be repaired SQL query : select count(*) from SS_products AS pt LEFT JOIN SS_product_options_values AS po ON pt.productID=po.productID and po.optionID=36 where enabled=1 AND categoryID=9343 OR enabled=1 AND categoryID=9560 OR enabled=1 AND categoryID=8936 OR enabled=1 AND categoryID=9636 OR enabled=1 AND categoryID=9561 OR enabled=1 AND categoryID=9562 OR enabled=1 AND categoryID=9558 OR enabled=1 AND categoryID=8937 OR enabled=1 AND categoryID=8938 OR enabled=1 AND categoryID=9620 OR enabled=1 AND categoryID=8939 OR enabled=1 AND categoryID=8940 OR enabled=1 AND categoryID=8941 OR enabled=1 AND categoryID=8942 OR enabled=1 AND categoryID=8943 OR enabled=1 AND categoryID=8944 OR enabled=1 AND categoryID=9618 OR enabled=1 AND categoryID=8945 OR enabled=1 AND categoryID=8946 OR enabled=1 AND categoryID=8947 OR enabled=1 AND categoryID=8935 order by in_stock DESC, Price, name