Error: Table './mlinkovi_link/dir_links' is marked as crashed and should be repaired
(SELECT t1.*, COUNT(DISTINCTROW t4.`id`) num_links, '0' `crossed`, t21.`num_cols` FROM `dir_categories` t1 LEFT JOIN `dir_flat_structure` t2 ON t1.`id` = t2.`id_parent` LEFT JOIN `dir_link_categories` t3 ON t2.`id_category` = t3.`id_category` LEFT JOIN `dir_links` t4 ON t3.`id_link` = t4.`id` AND t4.`status` = 'active' LEFT JOIN `dir_categories` t21 ON t1.`id_parent` = t21.`id` WHERE t1.`id_parent` = '0' AND t1.`id` >= 0 AND t1.`status` = 'active' GROUP BY t1.`id` ORDER BY t1.`title` LIMIT 0, 10000) UNION ALL (SELECT t1.*, COUNT(DISTINCTROW t5.`id`) num_links, '1' `crossed`, t21.`num_cols` FROM `dir_categories` t1 RIGHT JOIN `dir_crossed` t2 ON t1.`id` = t2.`id_crossed` LEFT JOIN `dir_flat_structure` t3 ON t1.`id` = t3.`id_parent` LEFT JOIN `dir_link_categories` t4 ON t3.`id_category` = t4.`id_category` LEFT JOIN `dir_links` t5 ON t4.`id_link` = t5.`id` AND t5.`status` = 'active' LEFT JOIN `dir_categories` t21 ON t1.`id_parent` = t21.`id` WHERE t2.`id_category` = '0' AND t1.`status` = 'active' GROUP BY t2.`id` ORDER BY t1.`title` LIMIT 0, 10000)