Mysql table reversing direction?

software development

#1

im using a mysql to make a blog, sort of, tho i don’t know much about the programming so I’ve managed to make one but I have to post from phpmyadmin. But my main problem is that the posts go underneath each other instead of on top. Is there some way to reverse it so that the new rows go on top of the table, not below it?

this is the page im referring to:
http://heartspark.net/paintblog/paintblog.php


#2

You need to change your SELECT statement. Assuming you have some sort of timestamp on each of your posts, it would end up being something like this:

SELECT * FROM posts ORDER BY timestamp DESCThat tells MySQL to retrieve rows by descending (reverse) timestamp order, making the most recent appear first.


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]