Hello i trying to select result date from mysql
mytable:
id_room | check_in | check_out
The problem is when i want to check reserved data betwwan date 1 to date 2.
for example my room data:
id_room : 1 ; check_in : 2014/11/01 ; check_out : 2014/11/08
So i want to check my booking in, 2014/11/03 and 2014/11/04. In system its will be not resulted thats mean no booking in that date, but in actual life 2014/11/03 and 2014/11/04 must have been booked. Because im check_in in 2014/11/01 and check_out in 2014/11/08.
I'm using
SELECT * FROM tabel WHERE cek_in BETWEEN '2014/11/03' AND '2014/11/04' OR cek_out BETWEEN 2014/11/03' AND '2014/11/04'
So if there any clue or other logic, please please tell me :D Thanks