SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard mcsolas's Avatar
    Join Date
    Jul 2004
    Location
    Hermosa Costa Rica
    Posts
    1,710
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how can I fit this structure into a db format

    I have a table "BrachOffice" in my db. Its real simple, just mainly holding address / office specific info to relate to other tables. Now I have a structure of office hours. To add in there. Since its a little tricky, with 2 in / out times possible.. I am just looking for suggestions as to how I can keep this info for that table. Since the hours change by day, I could just setup the ( 7 days wk * 4 times per day ) and store it like that. Thats 28 fields per row .. so I figured it was a good time to ask for advice before I try that method out.

    In Out In Out

    Mon 8 am 10 am 8 am 10 am
    Tues 8 am 10 am 8 am 10 am
    Wed
    Thurs 8 am 10 am 8 am 10 am
    Fri 8 am 10 am 8 am 10 am
    Sat 10 am 12 am
    Sun 12 pm 10 am


  2. #2
    SitePoint Zealot CdeMky's Avatar
    Join Date
    Sep 2004
    Location
    United States
    Posts
    123
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How were you planning on determining the weeks from each other? As I see it, it looks like you can't tell any single day from any other single day.

  3. #3
    SitePoint Wizard mcsolas's Avatar
    Join Date
    Jul 2004
    Location
    Hermosa Costa Rica
    Posts
    1,710
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Of course we would be able to, since each day may have 4 times associated with it. The table I was trying to paste in there didn't come through real well. Basically we are trying to track hours when a doctors office is open.

    Monday_In1, Monday_Out1, Monday_In2, Monday_Out2 .... etc for each day of the week.

    I was just wondering if there was a 'better way' or different methodology to follow here rather than creating 28 fields total in my db.

    Then taking into account holidays, time off .. ahh . what fun. I think I will just tell my clients that they can "enter this info into a text area" and leave it at that.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •