数据
RATE_FEED_ID, RATE_FEED_VALUE, RATE_FEED_STATUS, DATE RATE_FEED_TYPE
1 3 Active - 1
1. 5 Active - 1
2. 1 Active - 1
3. 2 Active - 1
4. 3 " - 1
我想要RATE_FEED_VALUE的平均值,我希望以星号格式显示平均值
码
<?php
//RATING AVERAGE COUNT
$star="SELECT SUM(RATE_FEED_VALUE) from FEEDBACK_RATING WHERE (RATE_FEED_TYPE='1') AND EMPLOYEE_ID='".$row["EMPLOYEE_ID"]."'";
$query = mysql_query($star);
while($data = mysql_fetch_array($query)){
$r= $data['RATE_FEED_VALUE'];
}
?>