SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Threaded View

  1. #1
    SitePoint Zealot
    Join Date
    Feb 2008
    0 Post(s)
    0 Thread(s)

    Best way to handle date frequency

    I built an event calendar where people can post their own events. I'd like to offer an option to the user who wants to post an ongoing event. One example is a class that happens every Saturday at the same time. Another is a museum that's having an ongoing show every Monday - Friday until August 31st.

    I already have start date, start time, end date, end time as fields in the db.

    What I was thinking was a showing the user a dropdown that lets them select:

    Every (pick days)
    Every other (pick days)
    Every day

    Then show checkboxes for:

    Tuesday (etc)

    Then a date field for End Date.

    My question is what is a good way to handle this in the database architecture. And what question to ask to get them to show up.
    I don't think I should create hundreds of records for the person who chooses Every Day until the end of time.
    I was hoping I could create a field for the record that showed date frequency, then ask the database the right query to get the events to show up with the others.
    Perhaps looking at my calendar would make sense. Any ideas would be very much appreciated.
    Last edited by ggeiger; Mar 22, 2013 at 08:38. Reason: re-wording


Posting Permissions

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