Jump to content

Recommended Posts

Hello I'm Rodney, i would like to ask for advice and guides on how could i make a simple seat map which every seat has to be updated by colors if it its reserved, paid etc. any idea to connect it to database to determine the seat status.

And one thing, im currently using the old php 4xxx and i will use php5, i want to know if what should i change in my database connection. like mysql as mysqli? is there anything more about it?  Sorry for my bad english.  thank you.  ::)

Link to comment
https://forums.phpfreaks.com/topic/285046-seat-map/
Share on other sites

  • 2 weeks later...

You don't say what type of seat but it would probably be time-based as well as location-based so you would need a data structure along these lines.

+------------+                                   +-------------+
|  seat      |                                   | session     |
+------------+                                   +-------------+
| seatId     |---+                         +-----| sessionId   |
| seat_row   |   |                         |     | sessionDate |
| seat_no    |   |                         |     | sessionTime |
| location   |   |                         |     +-------------+
+------------+   |                         |
                 |     +---------------+   |
                 |     | booking       |   |
                 |     +---------------+   |
                 |     | bookingId     |   |
                 |     | sessionId     | >-+
                 +---< | seatId        |
                       | status        |
                       +---------------+

"Location" in the seat table would, in the case of a theatre, be something like front stalls, balcony etc. You would need to store enough for you calculate the seat position on a map. Say from row and seat number in a simple layout.

 

Example http://forums.phpfreaks.com/topic/284542-allocated-seating-layout-help/?do=findComment&comment=1461646

Link to comment
https://forums.phpfreaks.com/topic/285046-seat-map/#findComment-1464793
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.