MYSQL ERROR
Error:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ' IF(UNIX_TIMESTAMP(DATE_ADD(`T1`.`HighlightDate`, INTERVAL `TMH`.`Days` HOUR)...' at line 1
Query:SELECT TIMESTAMPDIFF(DAY, DATE(`T1`.`Date`), DATE_ADD(CURDATE(), INTERVAL 1 DAY)) AS `Date_diff`, `T1`.*, `T4`.`Path`, `T4`.`Type` AS `Listing_type`, DATE(`T1`.`Date`) AS `Post_date`, `T4`.`Parent_keys`, `T4`.`Parent_IDs`, , IF(UNIX_TIMESTAMP(DATE_ADD(`T1`.`HighlightDate`, INTERVAL `TMH`.`Days` HOUR)) > UNIX_TIMESTAMP() AND `T1`.`HighlightDate` != '0000-00-00 00:00:00', '1', '0') as 'is_highlighted', (SELECT GROUP_CONCAT(`TR`.`Rate`, '=', `TR`.`Price`) AS `Rate_prices` FROM `fl_escort_rates` AS `TR` WHERE `T1`.`ID` = `TR`.`Listing_ID`) AS `Escort_Rates`, IF(`T1`.`Featured_date`, '1', '0') `Featured`, `T4`.`Parent_ID`, `T4`.`Key` AS `Cat_key`, `T4`.`Key` FROM `fl_listings` AS `T1` LEFT JOIN `fl_categories` AS `T4` ON `T1`.`Category_ID` = `T4`.`ID` LEFT JOIN `fl_monetize_plans` AS `TMH` ON `T1`.`Highlight_Plan` = `TMH`.`ID` WHERE `T1`.`Status` = 'active' AND `T4`.`Type` = 'girls' AND `T1`.`Sub_status` <> 'invisible' ORDER BY `T1`.`Date` DESC LIMIT 0, 16
Function:getRecentlyAdded
Class:rlListings
File:/home/missdiamonds/escort.missdiamonds.com/includes/controllers/recently_added.inc.php (line# 58)