'Can i use BETWEEN checkin and checkout in different datetimes?

select * 
  from reserva
     , casa  
 where casa.lotacao = '$tamanho' 
   and reserva.Casa_id = '$product_id' 
   and reserva.checkout = '$checkout' BETWEEN  reserva.checkin ='$checkin'

reserva = reservation
casa = home

I want to get for an example

Check-in 15-06-2016
check-out 20-06-2016

I want that 5 days to close.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source