SELECT p.id, p.autor, p.date, p.short_story, CHAR_LENGTH(p.full_story) as full_story, p.xfields, p.title, p.category, p.alt_name, m_num, p.allow_comm, p.fixed, p.tags, e.news_read, e.allow_rate, e.rating, e.vote_num, e.votes, e.view_edit, e.editdate, e.editor, e.reason, e.favorites FROM dle_post p LEFT JOIN dle_post_extras e ON (p.id=e.news_id) WHERE category regexp [[::]](8)[[::]] AND approve=1 AND date 2018-05-22 15:18:51 ORDER BY fixed desc, date DESC LIMIT 0,40