query($sql); while($row = $result->fetch()) { $id= $row['wshid']; ?>

workshop :



 
 
 
 

prepare("SELECT * FROM workshopsaccounting WHERE acc_wshid = ".$id." ORDER BY acc_id DESC "); // Excute the ststment $stmt1->execute(); //Assign To varriable $woshacc = $stmt1->FetchAll(); ?>

حسابات الورشة

تحكم

ت البيان

البيان

المبلغ

prepare($querya); $qtya= 0; $result = $conn->query($querya); while($suma = $result->fetch()) { $qtya += $suma['acc_amount']; } $queryb = "SELECT * FROM workshopsaccounting WHERE acc_wshid = ".$id." AND acc_type ='b' "; $query_run = $conn->prepare($queryb); $qtyb= 0; $result = $conn->query($queryb); while($sumb = $result->fetch()) { $qtyb += $sumb['acc_amount']; } ?>

مجموع الإيرادات =
مجموع المصاريف =