麻辣家族討論版版's Archiver

porkchop970 發表於 2011-1-25 15:33

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

$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>";
}

頁: [1]

麻辣家族討論版版為 麻辣學園 網站成員  由 昱得資訊工作室 © Since 1993 所提供