Error:145: Table './shar2kc_db/product' is marked as crashed and should be repaired
SELECT cat.id, cat.name, count(prd.id) cnt FROM category cat LEFT OUTER JOIN product prd ON prd.category_id = cat.id WHERE (cat.category_id = 0 OR cat.category_id IS NULL) GROUP BY cat.id ORDER BY cat.name