$strSQL5 = "SELECT sum(grade*level) AS sum FROM subject
LEFT JOIN regist ON
subject.subjectid = regist.subjectid
WHERE studentid ='".$_GET["studentid"]."' ";
$objQuery5 = mysql_query($strSQL5) or die ("Error Query [".$strSQL5."]");
$objQuery5 = mysql_fetch_array($objQuery5);
echo $total1 = $objQuery5[sum]; //ผลรวมเกรดคูณหน่วยกิต