SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2011
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Storing users to calendar

    Hello!

    Basically, my task at hand is to create a scheduler where users assign themselves to 10 days a year for volunteer work. 6 volunteers per day maximum. Ive been thinking about the best way to store this information in MYSQL.

    As of now, my best idea is to create a table with 365 rows of 7 columns. 1 day id, and 6 user id's. I feel that this is obviously the long hard way to do it. With this technique, I am also not sure how to manage those columns with user ids, as far as adding, and updating day rosters. I figure there must be a better way but havent found anything that helped this particular question.

    If anyone could give me a hint or tip in the "best practice" direction that would be great.
    Thanks!

  2. #2
    Non-Member
    Join Date
    Oct 2007
    Posts
    363
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by chasejbarnes View Post
    Hello!

    Basically, my task at hand is to create a scheduler where users assign themselves to 10 days a year for volunteer work. 6 volunteers per day maximum. Ive been thinking about the best way to store this information in MYSQL.

    As of now, my best idea is to create a table with 365 rows of 7 columns. 1 day id, and 6 user id's. I feel that this is obviously the long hard way to do it. With this technique, I am also not sure how to manage those columns with user ids, as far as adding, and updating day rosters. I figure there must be a better way but havent found anything that helped this particular question.

    If anyone could give me a hint or tip in the "best practice" direction that would be great.
    Thanks!
    A "best practice" would be to learn how databases work before trying to create a semi complicated database driven web application.


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
  •