Table 'SS_products' 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=8432 OR enabled=1 AND categoryID=9891 OR enabled=1 AND categoryID=8431 OR enabled=1 AND categoryID=8433 OR enabled=1 AND categoryID=8430 OR enabled=1 AND categoryID=8626 OR enabled=1 AND categoryID=8617 OR enabled=1 AND categoryID=8450 OR enabled=1 AND categoryID=6659 order by name ASC