SELECT news_id, news_date, news_group, news_priority, news_photo_4 AS news_photo, news_pdf_4 AS news_pdf, news_link_4 AS news_link, news_title_4 AS news_title, news_descr_4 AS news_descr, ord_categ, flag2, flag3, news_all FROM tbl_news WHERE flag2 != '1' AND flag3 != '1' AND (news_date_end IS NULL OR news_date_end > NOW()) AND ( (news_priority = 0) AND (isnull(news_group) OR news_group ='') ) and news_title_4!=''