$strSQL="select exhibit.amper as amper,exhibit.unit as unit ,exhibit.ex_bit as ex_bit ,exhibit.amount as amount, sum(exhibit.amount) as sum_amount from exhibit where ex_bit='$exbit' group by exhibit.amper";
//$sql="select * from exhibit where ex_bit='$exbit'";
//$strSQL = "SELECT * FROM exhibit where ex_bit = '$exbit'";
$objQuery = mysql_query($strSQL) or die ("Error Query [".$strSQL."]");
$num_rows=mysql_num_rows($objQuery); /* นับ Reccord ที่พบ */
$i=0;
while($objResult = mysql_fetch_array($objQuery))
{
$exhibits=$objResult[ex_bit];
$amounts=$objResult[amount];
$units=$objResult[unit];
$ampers=$objResult["amper"];
$cl=md5($ampers);
$cl=substr($cl,26);
$color[$i]=$cl;
$sum_rec=$result[sum_amount];
$arr1[$i]=$exhibits;
$arr2[$i]=$amounts;
$arr3[$i]=$units;
$arr4[$i]=$ampers;
$arr5[$i]=$sum_rec;
$avg1[$i]=$avgs;
$i++;
}
?>