Jump to content

php calender and mysql confusion


s3d

Recommended Posts

Hi There all

I have a project coming up, which will require something i am not sure how to approach.
Im fairly decent php / mySQL programmer

The project is for a car company which hire out drivers.
So the whole thing will have a load of drivers, who will state their availablity.

Then the admin create a new job, specify the dates, and will show the drivers which are available on these dates.

Short of having a master mySQL calender table (show below) is there a better way?
[code]
----------------------------------------
| id      | date             | driverID  |
----------------------------------------
| 1       | 12/02/06       | 6            |
| 2       | 13/02/06       | 6            |
| 3       | 14/02/06       | 6            |
| 4       | 15/02/06       | 6            |
| 5       | 12/02/06       | 2            |
| 6       | 17/02/06       | 2            |
| 7       | 18/02/06       | 2            |
| 8       | 19/02/06       | 2            |
| 9       | 12/02/06       | 7            |
----------------------------------------
[/code]
Considering the drivers are likly to available alot of the time, and they can shedule lets say 6 months in advanced, this table is gonna get absolutly massive.

Is there a better way?

Many thanks

MAtt
Link to comment
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.