displaying available vehicles for rent, but complex query doesn't work
Posted on 2005-04-10
have two tables related to this query: car table and reservation table.
In the car table i have:
In the reservation table I have :
I have a page called displaycar2.php. In this page i want to show available cars for the dates chosen. But I don't want any cars that are in the reservation table that interfere with those dates.
Just say have car with reg no 05-TN-5445 reserved for the following dates.
12/04/2005 to 14/04/2005
15/04/2005 to 18/04/2005
If a person comes along and enters in dates for rental, lets say, pickup = 13/04/05 to the 17/04/2005. the above car option should not be shown, as it is not available between those dates. Only cars that are not reserved for those dates should be shown.
i can post code i have at moment if ye want?