我只是想创建一个代码(WALL POST),我只能看到我的朋友按“feedid”排序的帖子,但它不是按“feedid”排序的……我该怎么办?
<?php
$user = $_SESSION['username'];
$from12 = mysql_query("SELECT * FROM friends WHERE username = '$user'");
if(mysql_num_rows($from12) != 0){
$from = mysql_query("SELECT * FROM friends WHERE username = '$user'");
while($row2 = mysql_fetch_object($from))
{
$from1 = $row2->friend;
$files = glob('lang/'. $lang .'.xml');
foreach($files as $file){
$ergebnis = mysql_query("SELECT * FROM feed WHERE username = '$from1' ORDER BY feedID DESC");
while($row = mysql_fetch_object($ergebnis))
{
echo' <div class="panel"><a href="user.php?lang='. $lang .'&user='. $row->username .'"><strong>'. $row->username .'</strong></a> ('.$row->date.'):<br/> '. $row->text .'<a href="com.php?id='. $row->feedID .'&lang='. $lang .'"><img src="'.$row->pic.'"></a><br/><a href="com.php?id='. $row->feedID .'&lang='. $lang .'">'. $xml->reply .'</a></div>';
}
}
}
}
else{
echo'';
}
?>