select a.`id`, CONCAT_WS('/', c.`url`, a.`url`) AS `url`, a.`date`, a.`title`, a.`announcement`, c.`name` from `cms_articles` a left join `cms_categories` c on c.`id`=a.`categoryId` where a.`language`='ru' and a.`published`='1' and a.`date`<='2018-04-24 19:11:52' and (a.`city`='' or a.`city`='TAS') and (a.`categoryId` in (114) or (a.`addCats2` like '%-114-%')) order by a.`ord` desc, a.`id` desc limit 0, 20