[thelist] storing dates in MySQL

Theodore Serbinski tserbinski at washsq.com
Tue Aug 10 13:40:50 CDT 2004


hi all! i'm currently designing a web based timesheet application for my 
company and i've got a question on what would be the best method to 
accomplish the following.

every two weeks, i need to generate new timesheets for everyone. in the 
database for each person's timesheet, i have a 'dateStart' field to 
denote this. but how should i represent and generate this value?

one idea i had was to have the dateStart reference another table where 
the first row would be now() and each subsequent row would have a valid 
2 week interval dateStart, ensuring that everyone's timesheet had the 
same dateStart. if this is a good idea, is there an easy way to generate 
these 2 week intervals from the now() row? i'd only want to generate the 
next interval when needed.

if not, anyone have any good ideas for this? how much to put in the 
database and how much to put in the application side?

thanks!

ted


More information about the thelist mailing list