Jump to content

storing days of the week


abazoskib

Recommended Posts

what would be the most efficient way to store days of the week? im using them to trigger notification events in an alarm type application. i was thinking i could store a value 0 or 1 for each day of the week, but I don't know how efficient that would be.

Link to comment
Share on other sites

sorry guys, didn't mean to do this the wrong way.

 

excuse me for my mistake. here i go again:

 

mySQL version 5.0.45

What I would like to do is have an event alarm clock. I want the user to be able to check the checkboxes for any days of the week they would like the alarm to show up, input their alert message, and then to enter the time of the alert. What would be the most efficient way to store which days they checkmarked? Like I said I was thinking I could store a 1 for each day of the week that is selected, and 0 for it being not selected. Of course this would mean I have a column in my table for each day of the week. Can anyone think of a better way to store the values?

 

hopefully that was a better explanation. thanks for the tip fenway.

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.