about six months ago when i was first learning php / mysql, i did an incredibly stupid move, which was inserting dates using date() instead of unix timestamp, and storing it as a varchar.
now that i've gone on to adding some sorting functionality, this has gotten pretty stupid, as one can imagine, since sorting by date will produce something like
september 8th, 05:04am
september 6th, 13:48pm
september 5th, 12:13pm
september 23rd, 10:22am
september 20th, 15:09pm
september 18th, 20:32pm
september 18th, 15:23pm
september 17th, 15:47pm
september 16th, 16:46pm
september 13th, 11:27am
and so on.
ugh.
so i've gotten to thinking, perhaps i could
somehow use a regular expression to evaluate if there's a 12 or 3 prepended to the second digit, and somehow resort the array?
while i assume anything is pretty much possible in theory, how feasible is it?
if anyone has any thoughts, ideas, code from
similar experiences, it'd be most appreciated.
lesson learned. sigh
-a