Categorizing posts by date
I'm trying to write a journal-type script.. The main page displays all the journal entries, organized by descending date. I want to make it so that if a user has, say, 3 posts on the same date, it will automatically organize all the posts from that day under one header. Example:
Post 1 - Jan 1st
Post 2 - Jan 1st
Post 3 - Jan 1st
Post 4 - Jan 4th
Instead of looking like that, I want it to look like this:
Jan 1st
-Post 1
-Post 2
-Post 3
Jan 4th
-Post 4
Any ideas on how I would accomplish this? Any tips are appreciated! I've played around a tiny bit with the GROUP BY control when I'm pulling data out of the dB but I can only seem to get it to display the first rows with each different date.
|