tristeve Posted September 28, 2006 Share Posted September 28, 2006 Hoping I can get some advice/pointers here. I've inherited a fairly basic MySQL where the date of an event is stored in 3 fields: day [tinyint(2)] - example: 19month [varchar(20)] - example: Novemberyear [year(4)] - example: 06I'm having no problems retrieving all events from the database, but I'd like to somehow sort them in ascending order from today's date.Thanks in advance,Steve Quote Link to comment https://forums.phpfreaks.com/topic/22380-newbie-date-help/ Share on other sites More sharing options...
fenway Posted September 28, 2006 Share Posted September 28, 2006 <shudder>Don't store dates that way...ever. Use the native DATE / DATETIME column types, since you can extract individual pieces of the date if stored properly. Quote Link to comment https://forums.phpfreaks.com/topic/22380-newbie-date-help/#findComment-100298 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.