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

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -