SELECT SQL_CALC_FOUND_ROWS dee_posts.ID FROM dee_posts JOIN dee_icl_translations t ON dee_posts.ID = t.element_id AND t.element_type = CONCAT('post_', dee_posts.post_type) WHERE 1=1 AND ( 0 = 1 ) AND dee_posts.post_type = 'event' AND ( ( ( t.language_code = 'en' OR 0 ) AND dee_posts.post_type IN ('post','page','location','event','bp-email' ) ) OR dee_posts.post_type NOT IN ('post','page','location','event','bp-email' ) ) GROUP BY dee_posts.ID ORDER BY dee_posts.post_date DESC LIMIT 0, 10