php - Booking query does not consider arrival and departure day -


I am looking for an answer to this dilemma but I could not find anything. I was hoping that you can help me understand what I am doing.

I have a mysql query, which only selects different spaces:

  SELECT * FROM apartments Where apartment_ID (select booking_part_id from where Starting up & lt; = '$ endingdate' and end date> = '$ startdate')   

The problem is that this query is not being considered by the day one It's half day and it's available.

To better explain:

If the booking of "booking" table ends on 16-01-2011 and search 16-01-2011 The apartment should be available because it is "half day" (day of departure).

Francisco

your sub Exclude = marks from the query, or at least on the last date if the blank space is always available on that date. The apartments should be checked to be vacant on the requested date. Also make sure your data is saved

If the availability depends on time, then you have to change your date field in datetimes.

Comments