Resource Sceduler: Resource availabilty

Discussion in 'PHP' started by TecBrat, May 7, 2009.

  1. #1
    As a PHP/MySQL study project I have decided to write a resource scheduler. It could be used for anything from a rental car company to a beauty salon or doctor's office. (I figure it will take me a couple of years or more to write.)

    I decided to take a break from writing code today and work on some more planning so that my code would come together better in future sessions and this problem came to mind.

    If a resource is never available on the weekends or is only available between x and y hours, what's the best way to handle that? I was thinking of maybe using cross reference tables where a resource ID and a span of date-time would be blocked out. The same resource ID could appear in multiple rows of the same table with different blocks. (assuming there is a resource id "1" a row might be (1, friday 1800, monday 0900) and another row could be (1,monday 1200, monday 1300).

    Just writing this post helped me bring the above paragraph together enough to think it would work, but I'd still like to know, does this seem like a good method, or is there something better that comes to mind?
     
    TecBrat, May 7, 2009 IP
  2. !Unreal

    !Unreal Well-Known Member

    Messages:
    1,671
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    165
    #2
    !Unreal, May 8, 2009 IP
  3. TecBrat

    TecBrat Member

    Messages:
    31
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    48
    #3
    Thanks for the link. It was an interesting read but It didn't seem to relate to what I am trying to do.
     
    TecBrat, May 9, 2009 IP