im trying to make a simple blog. but id like to be able for people to be displayed that newest article first. i have 4 categories in a mysql database(id{unique identifier set to autoincrement}, date, headline, story).
this is the code i know to display an article but not so sure how to do much more
<html>
<body>
<?php
$db = mysql_connect("localhost", "root");
mysql_select_db("test",$db);
$result = mysql_query("SELECT * FROM news",$db);
printf("<font size=5>%s<br><br>\n", mysql_result($result,0,"headline"));
printf("<font size=2>%s\n", mysql_result($result,0,"news"));
?>
</body>
</html>
i will be indexing the articles on another page so im not worried about that.