select c.`categories_id`,IF (c.`last_modified`>c.`date_added`, UNIX_TIMESTAMP(c.`last_modified`), UNIX_TIMESTAMP(c.`date_added`)) as `last_modified`, cd.cPath from `categories_description` cd, `categories` c where c.`categories_id`=cd.`categories_id` and cd.`full_url` = '/rele/vremeni/' and cd.`language_id` = '2' order by c.categories_master desc limit 1