ORDER BY
Posted: Sun Dec 22, 2002 7:48 pm
I'm having a little trouble. I have many band sites, one being http://www.thoughtriot.net, and I use mysql for adding, editing, deleting, and showing the tour dates. I use it for many other aspects of the site as well, but I'm having trouble with the tour dates.
When I display the dates on the site, I used to do this:
ORDER BY Date asc
But when I entered in some tour dates for this month and January, it got messed up. 01.10.03 would come before 12.28.02, because i guess that's how mysql would read them. I'm now displaying them by ID asc, that way for now it will temporarily place the 12.28.02 tour date at the top where it belongs, but if I had to now put in another date for let's say, 12.29.02 because the band just booked another show on that date, it would go to the bottom. So, how would I display the dates with ORDER BY Date ASC and make 12.28.02 be above all of those 01.??.03 and 02.??.03 dates? Is there some function or something that reads the full date before echoing them instead of just going by the first 1 or 2 digits?
When I display the dates on the site, I used to do this:
ORDER BY Date asc
But when I entered in some tour dates for this month and January, it got messed up. 01.10.03 would come before 12.28.02, because i guess that's how mysql would read them. I'm now displaying them by ID asc, that way for now it will temporarily place the 12.28.02 tour date at the top where it belongs, but if I had to now put in another date for let's say, 12.29.02 because the band just booked another show on that date, it would go to the bottom. So, how would I display the dates with ORDER BY Date ASC and make 12.28.02 be above all of those 01.??.03 and 02.??.03 dates? Is there some function or something that reads the full date before echoing them instead of just going by the first 1 or 2 digits?