jeudi 15 avril 2021

How should the Laravel query builder output of this query be?

How should the Laravel query builder output of this query be?

 Select T.price_default,price_discounted,price_date,room.hotel_room_id,hotel_lang.title,hotel_lang.description,hotel_lang.slug,hotel_lang.lang_code,hotel.showcase_image,hotel.address,hotel.hotel_id from (Select *,ROW_NUMBER() OVER (
                 PARTITION BY hotel_room_id
                 ORDER BY price_date ASC
           ) AS ROWNUMBER from hotel_room_prices Where price_date BETWEEN '$mindate' AND '$maxdate' ) AS T
                    left join hotel_rooms room on T.hotel_room_id=room.hotel_room_id
                    left join hotels hotel on room.hotel_id=hotel.hotel_id
                    left join hotel_langs hotel_lang on hotel.hotel_id=hotel_lang.hotel_id
                        WHERE T.ROWNUMBER=1 and hotel_lang.lang_code='$locale' and t.price_default >= $min_price and t.price_default <= $max_price and hotel_lang.title ILIKE '%$query%'


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3mP5k9o
via IFTTT

Aucun commentaire:

Enregistrer un commentaire