A Database Error Occurred

Error Number: 1064

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 ') GROUP BY hotels.hotel_id ORDER BY RAND() LIMIT 0,4' at line 12

SELECT MIN(rt) AS hotel_rate, hotels.*,photo_center.filename,tour_places.place_name FROM(SELECT hotel_season_rates.hotel_id AS id,rate AS rt FROM hotel_season_rates WHERE hotel_season_rates.status = 1 AND (from_date < '2024-03-29' AND to_date > '2024-03-29')) htl_rate left join hotels ON hotels.hotel_id = htl_rate.id left join(select filename,link_id,photo_type,section_type,media_type,status from photo_center order by rand()) AS photo_center on photo_center.link_id=hotels.hotel_id and photo_center.photo_type = 1 and photo_center.section_type = 5 and photo_center.media_type = 1 and photo_center.status = 1 left join tour_places on tour_places.place_id=hotels.place_id where hotels.status=1 and hotels.hotel_id!=139 and hotels.place_id=35 and hotels.hotel_id not in () GROUP BY hotels.hotel_id ORDER BY RAND() LIMIT 0,4

Filename: models/Hotels_detail_model.php

Line Number: 102