Ошибка базы данных WordPress: [Table './tp2014/wp_sam_stats' is marked as crashed and should be repaired]
SELECT sp.id, sp.name, sp.description, sp.code_before, sp.code_after, sp.place_size, sp.place_custom_width, sp.place_custom_height, sp.patch_img, sp.patch_link, sp.patch_code, sp.patch_adserver, sp.patch_dfp, sp.patch_source, sp.trash, (SELECT COUNT(*) FROM wp_sam_ads sa WHERE sa.pid = sp.id AND sa.trash IS FALSE) AS ad_count, (SELECT COUNT(*) FROM wp_sam_ads sa WHERE sa.pid = sp.id AND sa.trash IS FALSE AND (IF(sa.ad_users = 0, TRUE, (sa.ad_users_unreg = 1))) AND ((sa.view_type = 1) OR (sa.view_type = 0 AND (sa.view_pages+0 & 1152))) AND (sa.ad_cats = 0) AND (sa.ad_authors = 0) AND IF(sa.view_type < 2 AND sa.ad_tags AND IF(sa.view_type = 0, sa.view_pages+0 & 1152, TRUE), FIND_IN_SET('sovershenstvovanie', sa.view_tags), TRUE) AND IF(sa.view_type < 2 AND sa.x_tags AND IF(sa.view_type = 0, sa.view_pages+0 & 1152, TRUE), NOT FIND_IN_SET('sovershenstvovanie', sa.x_view_tags), TRUE) AND IF(sa.ad_schedule, CURDATE() BETWEEN sa.ad_start_date AND sa.ad_end_date, TRUE) AND IF(sa.limit_hits, sa.hits_limit > (SELECT IFNULL(COUNT(*), 0) FROM wp_sam_stats ss WHERE ss.id = sa.id AND ss.event_type = 0), TRUE) AND IF(sa.limit_clicks, sa.clicks_limit > (SELECT IFNULL(COUNT(*), 0) FROM wp_sam_stats ss WHERE ss.id = sa.id AND ss.event_type = 1), TRUE) AND (sa.ad_weight > 0)) AS ad_logic_count, (SELECT COUNT(*) FROM wp_sam_ads sa WHERE sa.pid = sp.id AND sa.trash IS FALSE AND (IF(sa.ad_users = 0, TRUE, (sa.ad_users_unreg = 1))) AND ((sa.view_type = 1) OR (sa.view_type = 0 AND (sa.view_pages+0 & 1152))) AND (sa.ad_cats = 0) AND (sa.ad_authors = 0) AND IF(sa.view_type < 2 AND sa.ad_tags AND IF(sa.view_type = 0, sa.view_pages+0 & 1152, TRUE), FIND_IN_SET('sovershenstvovanie', sa.view_tags), TRUE) AND IF(sa.view_type < 2 AND sa.x_tags AND IF(sa.view_type = 0, sa.view_pages+0 & 1152, TRUE), NOT FIND_IN_SET('sovershenstvovanie', sa.x_view_tags), TRUE) AND IF(sa.ad_schedule, CURDATE() BETWEEN sa.ad_start_date AND sa.ad_end_date, TRUE) AND IF(sa.limit_hits, sa.hits_limit > (SELECT IFNULL(COUNT(*), 0) FROM wp_sam_stats ss WHERE ss.id = sa.id AND ss.event_type = 0), TRUE) AND IF(sa.limit_clicks, sa.clicks_limit > (SELECT IFNULL(COUNT(*), 0) FROM wp_sam_stats ss WHERE ss.id = sa.id AND ss.event_type = 1), TRUE) AND IF(sa.ad_weight > 0, (sa.ad_weight_hits*10/(sa.ad_weight*1000)) < 1, FALSE)) AS ad_full_count FROM wp_sam_places sp WHERE sp.id = 1 AND sp.trash IS FALSE;