Serge
03-13-2003, 11:40 PM
Ok I need more help. I want to sort a bunch of things from a query by date. So far here is how it works.
<?php
include ("sql.php")
$result = mysql_query("select articleid, title, adate from article") or
die (mysql_error());
while ($row = mysql_fetch_array($result))
{
echo "<a href=\"http://www.surrix.net/db/article.php?id=$row["articleid"]\">$row["title"]</a>";
echo "<br>\n";
}
mysql_free_result($result);
?>
I need to find a way to sort these when they come up by date I figare I will need a function to find the date and then some how compare it to the one coming out of the mysql database. Could someone please help me to how I would go about doing this.
<?php
include ("sql.php")
$result = mysql_query("select articleid, title, adate from article") or
die (mysql_error());
while ($row = mysql_fetch_array($result))
{
echo "<a href=\"http://www.surrix.net/db/article.php?id=$row["articleid"]\">$row["title"]</a>";
echo "<br>\n";
}
mysql_free_result($result);
?>
I need to find a way to sort these when they come up by date I figare I will need a function to find the date and then some how compare it to the one coming out of the mysql database. Could someone please help me to how I would go about doing this.