Query: | SELECT SQL_CALC_FOUND_ROWS `T1`.*, `T3`.`Path`, `T3`.`Parent_ID`, `T3`.`Key` AS `Cat_key`, `T3`.`Key`, `T3`.`Type` AS `Listing_type`, `T3`.`Parent_keys`, `T3`.`Parent_IDs`, IF(`T1`.`Date` != `T1`.`HighlightDate` AND `T1`.`HighlightDate` != '0000-00-00 00:00:00', '1', '0') as 'is_highlighted', IF(`T1`.`Featured_date`, '1', '0') `Featured` FROM `fa_listings` AS `T1` LEFT JOIN `fa_categories` AS `T3` ON `T1`.`Category_ID` = `T3`.`ID` LEFT JOIN `fa_accounts` AS `T7` ON `T1`.`Account_ID` = `T7`.`ID` WHERE `T1`.`Status` = 'active' AND `T3`.`Type` = 'services' AND ((`T1`.`Category_ID` = OR FIND_IN_SET(, `T3`.`Parent_IDs`) > 0) OR (FIND_IN_SET(, `T1`.`Crossed`) > 0)) AND `T1`.`Sub_status` <> 'invisible' AND `T1`.`shc_auction_status` <> 'closed' ORDER BY `Featured` DESC , `T1`.`date` DESC LIMIT 0, 16 |