I'm working on a project for a friend of mine that is basically a web log. When he makes a post, it inserts the data into a MySQL database, and also inserts a timestamp which is data("g:ia") (shows hh:mm am/pm). It then just displays all of the posts with the timestamps underneath them. Well, he wants the posts to be catergorized beneath a date, so it would be something like:
Headlines for March 7th, 2002 Title 1 message text posted by friend at 1:00am Title 2 message text posted by friend at 9:10pm Healines for March 6th, 2002 Title 1 etc etc etc I'm trying to figure out a way to do this without really making things screwy and bug prone, but can't really come up with any good ideas. I know I'm going to have to have 2 time columns, one with the timestamp, another with the date, but trying to figure out how to organize this all is really frustrating me. Can someone figure out a way to do this without involving multiple embedded while loops, multiple SQL statements and a whole slew of temporary variables? I don't want example code or anything, just an idea of how to do something like this. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php