[GLLUG] More MySQL
Mike Szumlinski
szumlins@msu.edu
Tue, 19 Mar 2002 13:15:51 -0500
Thanks to all that answered my last 5 or so devel questions. I have a new
one. I'm creating a new table that I want to use as a "what's new" storage
container, so it will basically have just a timestamp, a poster name, and
the message data. I want to sort these things on the page with the most
recent date first. Normally I do this in php:
$query = mysql_query("SELECT date_format(dateadded, '%M %d, %Y') AS
Readable_Date from mytable",$db);
And then:
while ($daterow = mysql_fetch_row($query)) {printf("$daterow[0]<br>")}
This prints out the dates of my entries in chronological order, from oldest
to newest. Does anyone know how to do this? Am I just an idiot and using
poor poor poor coding methodology (probably).
Thanks again to all that have been helping me here.
-Mike
-=--===---===---===---===-=-
|Mike Szumlinski |
|Michigan State University |
-=--===---===---===---===-=-
"We are what we repeatedly do. Excellence, then, is not an act, but a habit"
-Aristotle