How to store opening weekdays in a database

Posted by JoaoPedro on Stack Overflow See other posts from Stack Overflow or by JoaoPedro
Published on 2010-04-28T15:02:58Z Indexed on 2010/04/28 15:23 UTC
Read the original article Hit count: 140

Filed under:

I have a group of checkboxes where the user selects some of the weekdays (the opening days of a store). How can I save the selected days? Should I save something like 0111111 (zero means closed on sunday) on the same field and split the result when reading the data? Or create a field for each day and store 0 or 1 on each (weird)?

© Stack Overflow or respective owner

Related posts about database-design