php - Querying for days where bookings already exist -


I have a booking table, I would like to ask to know which day before they have future bookings , Especially the space.

  ID Buyer Timetable Endadays Vehicle Spec Situation 2 5 2014-04-29 09:00:00 2014-04-29 21:00:00 2 1 1 3 6 2014-05- 03 13:00:00 2014-05-03 18:00:00 3 1 1  

So the result should be as follows (meaning that at least one booking is present on that day) :

  Mangal Mouth debate through Venus Sat true true false false false false false  

Then there is a booking in my exanmple on Saturday May 3, hence the result The Saturn column will be true because it is booking on Saturdays. The tu columns will also be true because there is a booking on 29th April, which is Tuesday. Let's say that there is no future booking for space on any day which is Wednesday, so the pillar of Wednesday is false.

Whatever you can gather, you are trying to do something like this:

  $ query = mysql_query ("Select Book WHERE datetime = '$ datetime'"); $ Taken = mysql_num_rows ($ query); // Checks how many bookings are done while using that date ($ taken & gt; = 1) {return false;} other {back true;}  

if It is not what you want, please comment with more information.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -