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=7118 OR enabled=1 AND categoryID=7044 OR enabled=1 AND categoryID=6260 OR enabled=1 AND categoryID=7111 OR enabled=1 AND categoryID=6261 OR enabled=1 AND categoryID=6262 OR enabled=1 AND categoryID=6259 OR enabled=1 AND categoryID=9823 OR enabled=1 AND categoryID=9138 OR enabled=1 AND categoryID=8619 OR enabled=1 AND categoryID=6465 OR enabled=1 AND categoryID=6466 OR enabled=1 AND categoryID=9960 OR enabled=1 AND categoryID=7223 OR enabled=1 AND categoryID=6467 OR enabled=1 AND categoryID=6468 OR enabled=1 AND categoryID=8757 OR enabled=1 AND categoryID=6469 OR enabled=1 AND categoryID=6470 OR enabled=1 AND categoryID=6471 OR enabled=1 AND categoryID=7370 OR enabled=1 AND categoryID=6472 OR enabled=1 AND categoryID=6473 OR enabled=1 AND categoryID=8881 OR enabled=1 AND categoryID=9517 OR enabled=1 AND categoryID=9623 OR enabled=1 AND categoryID=9740 OR enabled=1 AND categoryID=6464 OR enabled=1 AND categoryID=6463 OR enabled=1 AND categoryID=7172 OR enabled=1 AND categoryID=7173 OR enabled=1 AND categoryID=7436 OR enabled=1 AND categoryID=7171 OR enabled=1 AND categoryID=7177 OR enabled=1 AND categoryID=8113 OR enabled=1 AND categoryID=8070 OR enabled=1 AND categoryID=8071 OR enabled=1 AND categoryID=8733 OR enabled=1 AND categoryID=7170 OR enabled=1 AND categoryID=8665 OR enabled=1 AND categoryID=7169 OR enabled=1 AND categoryID=6513 OR enabled=1 AND categoryID=8446 OR enabled=1 AND categoryID=9626 OR enabled=1 AND categoryID=8447 OR enabled=1 AND categoryID=9637 OR enabled=1 AND categoryID=9148 OR enabled=1 AND categoryID=8448 OR enabled=1 AND categoryID=8449 OR enabled=1 AND categoryID=6590 OR enabled=1 AND categoryID=9822 OR enabled=1 AND categoryID=8812 OR enabled=1 AND categoryID=6743 OR enabled=1 AND categoryID=6747 OR enabled=1 AND categoryID=7280 OR enabled=1 AND categoryID=6753 OR enabled=1 AND categoryID=6756 OR enabled=1 AND categoryID=8728 OR enabled=1 AND categoryID=7617 OR enabled=1 AND categoryID=7808 OR enabled=1 AND categoryID=8813 OR enabled=1 AND categoryID=9619 OR enabled=1 AND categoryID=8355 OR enabled=1 AND categoryID=6742 OR enabled=1 AND categoryID=6799 OR enabled=1 AND categoryID=8672 OR enabled=1 AND categoryID=8673 OR enabled=1 AND categoryID=8674 OR enabled=1 AND categoryID=8675 OR enabled=1 AND categoryID=6804 OR enabled=1 AND categoryID=8676 OR enabled=1 AND categoryID=8682 OR enabled=1 AND categoryID=8677 OR enabled=1 AND categoryID=9862 OR enabled=1 AND categoryID=8678 OR enabled=1 AND categoryID=8679 OR enabled=1 AND categoryID=8680 OR enabled=1 AND categoryID=9582 OR enabled=1 AND categoryID=6807 OR enabled=1 AND categoryID=7023 OR enabled=1 AND categoryID=7024 OR enabled=1 AND categoryID=9949 OR enabled=1 AND categoryID=7022 OR enabled=1 AND categoryID=9878 OR enabled=1 AND categoryID=8963 order by in_stock DESC, Price, name