Forum Moderators: coopster
For exampel in the database if I have an booking in datecolumns llegada and salida dates 25/11 and 15/12, I would like the days 25/11 and 15/12 to be marked as available.
This is the code I have:
$result = mysql_query ("SELECT llegada, salida, propiedad from bookings where ( propiedad = '$propiedad' )
AND (('$llegada' BETWEEN llegada AND salida) or ('$salida' BETWEEN llegada AND salida) or (llegada < '$llegada' AND salida > '$salida') or (llegada > '$llegada' AND salida < '$salida'))", $dbh);
In this piece of the code this is what I would like to do but donīt work:
('$llegada' BETWEEN llegada AND salida-1) or ('$salida' BETWEEN llegada-1 AND salida)