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 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. Link to comment https://forums.phpfreaks.com/topic/22380-newbie-date-help/#findComment-100298 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.