php - how to update quantiy by runnnig multiple queries? -
php - how to update quantiy by runnnig multiple queries? -
how run these 2 query @ 1 time in tbl_purchase_return inserts new info , on otherhand updates quantiy tbl_product?
$query= "insert tbl_purchase_return(product_id,supplier_id,quantity,date) values ($prd_id,$sup_id,$quantity,'$date')"; $query="update quantity , set quantity= getquantityfomproductid($id)- $quantity `tbl_product`.`id` = $id";
you first quantity of product fire first query , on success ( after getting lastly inserted id) of run sec query.
php
Comments
Post a Comment