Jump to content

Not ordering by date?


Bolanb

Recommended Posts

I have a feature that shows the most recently replied to posts of each forum on my website, except in some forums the person who has replied the latest remains on the bottom instead of being aligned at the top, and in other forums it works perfectly (aligned on the top). What could be causing such a contradiction? My coding for retrieving the data is:

 

<?php

$faces="SELECT * FROM ffaces WHERE fid='$fid1' ORDER BY date ASC";
$fresult=mysql_query($faces);

$color="1";

while($rowface=@mysql_fetch_array($fresult)){

if($color==1){
echo "<tr bgcolor=#000030>
<td vlign=middle>
<font face=arial size=2><u><a href='".$rowface['link']."'>
".$rowface['user']."</u></a></td></tr>";
$color="2";
}
else
{
echo "<tr bgcolor=#000050>
<td vlign=middle>
<font face=arial size=2><u><a href='".$rowface['link']."'>
".$rowface['user']."</u></a></td></tr>";
$color="1";
}
}
?>

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/147173-not-ordering-by-date/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.