$sql7 = "select * from donat WHERE Status=2 AND DonorID = '".$DonorID."' ";
$sql = mysql_query($sql7);
$row1 = mysql_fetch_array($sql) or die ("Error Query 55+");
if($row1[Quan_PRC]==0){
$sql1 = "UPDATE donat SET Quan_PRC = '$Quan_PRC' where DonorID = $DonorID And Status=2";
$objQuery = mysql_query($sql1) or die ("Error Query :".$sql1."");
}
else if($row1[Quan_LPRC]!=0){
$sql2 = "UPDATE donat SET Quan_LPRC ='$Quan_LPRC' where DonorID =$DonorID And Status=2";
$objQuery = mysql_query($sql2) or die ("Error Query :".$sql2."");
}
else if($row1[Quan_PRC]!=0 and $row1[Quan_LPRC]!=0 and $row1[Quan_LDPRC]==0){
$sql3 = "UPDATE donat SET Quan_LDPRC = '$Quan_LDPRC' where DonorID =$DonorID And Status=2";
$objQuery = mysql_query($sql3) or die ("Error Query :".$sql3."");
}
echo"เปลี่ยนแปลงข้อมูลเรียบร้อยแล้ว<br>";
มันขึั้ erroe แบบนี้ Error Query :UPDATE donat SET Quan_LPRC ='150' where DonorID =D002 And Status=2
$sql1 = "UPDATE donat SET Quan_PRC = '$Quan_PRC' where DonorID = '$DonorID' And Status=2";
$objQuery = mysql_query($sql1) or die ("Error Query :".$sql1."");
ขี้น error แบบนี้ ค่ะ Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:\AppServ\www\PHPMyDream\Data_BCH2.php on line 32