View Single Post
Unread 14 Apr 2005, 18:20   #3
Structural Integrity
Rawr rawr
 
Structural Integrity's Avatar
 
Join Date: Dec 2000
Location: Upside down
Posts: 5,300
Structural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriendStructural Integrity needs a job and a girlfriend
Re: [database] Help me sort this out in my brain!

store the date in a long integer like yyyymmdd (ie: 20050414) and do some wickid SQL to get a particular month like ((ldate - (ldate MOD 100) MOD 10000) / 100) AS myMonth WHERE myMonth = 11.
This is how the database at my work works BTW. it's hell.

BTW, is days.monthnum different from month.monthnum ?
And why can't you just have day/month/year fields in the dayitems table and make sure those three make an unique combo.
I don't see why you need to store days/months/years in separate tables.
__________________
"Yay"
Structural Integrity is offline   Reply With Quote