Array ( [0] => 00000 [1] => [2] => )
SELECT news.id, news.position, news.comments, news.viewed, (select ni.filename from news_images ni where ni.contId = news.id order by ismain desc, position asc limit 1) as filename, i18n.title as title, i18n.textCleared, cat.title as parentName, news.url, news.adate, c.url as categoryUrl FROM news LEFT JOIN news_i18n i18n on i18n.newsId = news.id LEFT JOIN categories as c on c.id = news.categoryId LEFT JOIN categories_i18n as cat on cat.categoryId = news.categoryId WHERE news.isactive = 1 AND c.isactive = 1 ORDER BY news.id desc LIMIT 30