- ,
SELECT GET_LOCK('704d348b1b585dee3c74c26ba8e84fff', 300) AS ci_session_lock
SELECT `data`FROM `ci_sessions`WHERE `id` = 'c4tllr589uvkgf91561iod7qtlooeuue'
SELECT `a`.`id` as `ad_id`, `a`.`reference_no`, `a`.`is_top_seller`, `a`.`ad_thumb_img`, `a`.`title`, `a`.`slug`, `a`.`description`, `a`.`price`, `a`.`is_negotiable`, `a`.`phone_one`, `a`.`phone_two`, `a`.`approved_date`, `ds`.`name_en` as `district_name`, `ds`.`district_slug`, `ct`.`name_en` as `city_name`, `ct`.`city_slug`, `at`.`ad_type`, `c`.`category_name`, `c`.`category_slug`, `sc`.`category_slug` as `sub_category_slug`, `sc`.`category_name` as `sub_category_name`FROM `ads` `a`LEFT JOIN `ad_types` `at` ON `at`.`id` = `a`.`ad_type_id`LEFT JOIN `categories` `c` ON `c`.`id` = `a`.`category_id`LEFT JOIN `categories` `sc` ON `sc`.`id` = `a`.`sub_category_id`LEFT JOIN `districts` `ds` ON `ds`.`id` = `a`.`district_id`LEFT JOIN `cities` `ct` ON `ct`.`id` = `a`.`city_id`WHERE `a`.`id` = '1677817'AND `a`.`is_approved` = 1AND `a`.`archived` = 0ORDER BY `a`.`approved_date` DESC
SELECT `a`.*, `ca`.*FROM `ads_attributes` `a`LEFT JOIN `category_attributes` `ca` ON `ca`.`id` = `a`.`attribute_join_id`WHERE `a`.`ads_id` = '1677817'
SELECT *FROM `ads_photos`WHERE `ads_id` = '1677817'
SELECT `c`.*, count(a.category_id) as ads_countFROM `categories` `c`LEFT JOIN `ads` `a` ON `a`.`category_id` = `c`.`id`WHERE `c`.`parent_category_id` IS NULLAND `c`.`is_active` = 1AND `a`.`is_approved` = 1AND `a`.`archived` = 0AND `a`.`approved_date` >= NOW() - INTERVAL 60 DAYGROUP BY `a`.`category_id`ORDER BY `c`.`order_number`
Array ( )