I wrote a news script in php togheter with mySQL.
This is the script to display the results, this works fine:
Is it possible to sort the news on date? The $date var has as format: yyyy-mm-ddPHP Code:<?
require("config.php");
?>
<style>
<?=$style;?>
</style>
<?
$query = mysql_query("select * from $table", $db);
$count = mysql_affected_rows($db);
for($i = 0; $i < $count; $i++)
{
if($i < 10){
list($title,$date,$poster,$mail,$news) = mysql_fetch_row($query);
$print = "<b>$title</b> by <a href=\"mailto:$mail\">$poster</a>";
$print .= "<hr>";
$print .= "$news<br><br>";
echo $print;
}
}
mysql_close($db);
?>
Any suggestions?




Bookmarks