SELECT `icn_hotels`.`id` AS `id`, `icn_hotels`.`fullname` AS `fullname`, `icn_hotels`.`slug` AS `slug`, `icn_hotels`.`stars` AS `stars`, `icn_hotels`.`rooms` AS `rooms`, `icn_hotels`.`latitude` AS `latitude`, `icn_hotels`.`longitude` AS `longitude`, `icn_hotels`.`commission` AS `commission`, `icn_hotels`.`booking_com_id` AS `booking_com_id`, `icn_hotels`.`booking_com_type_thumbnail` AS `booking_com_type_thumbnail`, `icn_hotels`.`booking_com_active` AS `booking_com_active`, `icn_hotels`.`publication_date` AS `publication_date`, `icn_hotels`.`district_id` AS `district_id`, `icn_hotels`.`languages_id` AS `languages_id`, `icn_city_translate`.`fullname` AS `city_name`, `icn_categories_translate`.`categories_id` AS `categories_id`, `icn_categories_translate`.`fullname` AS `categories_name` FROM `icn_hotels` LEFT JOIN `icn_city_translate` ON `icn_city_translate`.`city_id` = `icn_hotels`.`city_id` LEFT JOIN `icn_categories_translate` ON `icn_categories_translate`.`categories_id` = `icn_hotels`.`categories_id` WHERE `icn_hotels`.`active` = '1' AND `icn_hotels`.`show_booking` = '1' AND `icn_hotels`.`city_id` != '1865' AND `icn_hotels`.`booking_com_active` = '1' AND `icn_city_translate`.`languages_id` = '2' AND `icn_categories_translate`.`languages_id` = '2' AND TRUNCATE (6363 * sqrt(POW( RADIANS('40.267468') - RADIANS(icn_hotels.latitude), 2) + POW(RADIANS('23.451927') - RADIANS(icn_hotels.longitude), 2)), 3) < '40' ORDER BY `icn_hotels`.`stars` DESCArray ( [id] => 2642 [fullname] => Danai Beach Resort & Villas [slug] => danai-beach-resort-villas [stars] => 5 [rooms] => 60 [latitude] => 40.22776000000 [longitude] => 23.62799800000 [commission] => 15 [booking_com_id] => 43328 [booking_com_type_thumbnail] => icastelli [booking_com_active] => 1 [publication_date] => 2014-10-13 16:14:13 [district_id] => 0 [languages_id] => 2 [city_name] => Nikiti [categories_id] => 9 [categories_name] => Resort ) Array ( [id] => 4436 [fullname] => Ikos Oceania [slug] => ikos-oceania [stars] => 5 [rooms] => 298 [latitude] => 40.24523800000 [longitude] => 23.26817400000 [commission] => 0 [booking_com_id] => 13220 [booking_com_type_thumbnail] => booking [booking_com_active] => 1 [publication_date] => 2019-08-06 08:05:31 [district_id] => 0 [languages_id] => 0 [city_name] => Nea Moudania [categories_id] => 9 [categories_name] => Resort ) Array ( [id] => 4356 [fullname] => Achtis [slug] => achtis [stars] => 4 [rooms] => 35 [latitude] => 40.09521300000 [longitude] => 23.43493000000 [commission] => 0 [booking_com_id] => 249341 [booking_com_type_thumbnail] => booking [booking_com_active] => 1 [publication_date] => 2019-07-17 07:27:22 [district_id] => 0 [languages_id] => 0 [city_name] => Afitos [categories_id] => 9 [categories_name] => Resort )