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

php - How to pass multiple values from url -

database - php search bar when I press submit with nothing in the search bar it shows all the data -

ios - How to load .png images from Documents folder of an app -