I am making a booking module for a hotel management app in mysql and I am trying to do the following:
Let’s say there is a room and it has been booked by 3 clients on these dates:
2012-09-01 12:00:00 Customer #1
2012-09-02 12:00:00 Customer #1
2012-09-03 12:00:00 Customer #1
2012-12-03 12:00:00 Customer #2
2013-02-01 12:00:00 Customer #3
2013-02-02 12:00:00 Customer #3
These are my mysql data. I am trying to make a master view based on these data:
2012-09-01 :: 2012-09-03 -> Customer #1
2012-12-03 :: 2012-12-03 -> Customer #2
2013-02-01 :: 2013-02-02 -> Customer #3
So that when the administrator clicks on the corresponding customer / date link would show only the data for that customer (taken from the first screen) as a detail view.
Is this possible? Does it need a stored procedure?
1 Answer