CREATE DEFINER=root@localhost PROCEDURE roomAvailbility( IN checkindate date, IN checkoutdate date, out roomtype char(20)) BEGIN select count(*) INTO roomtype from room_1401557b where not exists (select room_1401557b.room_id from reserved_room_1401557b,room_1401557b,reservation_1401557b where room_1401557b.room_id=reserved_room_1401557b.room_id and reservation_1401557b.reservation_id=reserved_room_1401557b.reservation_id and current_date()>=check_in_date and current_date()
END
Aucun commentaire:
Enregistrer un commentaire