返回列表 上一主題 發帖

請問如何對多筆資料加總後, 再利用其結果排序

請問如何對多筆資料加總後, 再利用其結果排序

$sql="SELECT * FROM newforum where type=121 and source=17 group by bc order by $noof asc";
$result=mysql_query($sql);
while (list($no,$date,$type,$title,$content,$ba,$bb,$bc,$bd,$be,$bf,$id,$mainname,$source,$position,$uploada,$uploadb,$uploadc,$updatetime,$hits,$postmemid,$posthktdname,$postidentity,$postclub)=mysql_fetch_row($result))
{
$rows=mysql_query("select * from newforum where type=121 and source=17 and bc=$bc");$noof=mysql_num_rows($rows);
echo $bc."-".$noof."<br>";
}

        靜思自在 : 【時間無法遮擋】怕時間消逝,花了許多心血,想盡各式方法要遮擋時間,結果是:浪費了更多時間,且一無所成!
返回列表 上一主題