I have two interrelated tables,purchase_order & purchase_order_data.
purchase_order table contains info like supplier name,po no,gr_status etc, whereas purchase_order_data table contains values that are inserted through dynamic text fields, like qty, price etc.
I want to run the following query so as to make gr_status=1 if all the quantities in dynamic rows are received in goods received note.
$gr_status=mysql_query("UPDATE purchase_order SET gr_status=1 WHERE po_no='".$po_no."'");
But the problem here is, if this query finds even one quantity received totally, it updates the status as 1.
Can anyone guide me how to check that all the quantities with the purchase order are received or not??
I hope I sound clear :shifty: