This topic is locked
[SOLVED]

 Update another table for 1 fields after inline add proce

10/14/2010 9:14:25 AM
PHPRunner General questions
S
stcoid author

Dear all PHPRunner,
Please help me,
How to update another table for 1 fields after inline add process.

Sample :
tb_stock

saldo
tb_order

qty
after tb_order inline add process, next update saldo process

Maybe this query like this :

$sql="UPDATE tb_stock SET saldo=saldo-".$values["qty"]." WHERE id_product='". $values["id_product"] ."'";

Thanks

S
stcoid author 10/14/2010

Hi All <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=53550&image=1&table=forumreplies' class='bbc_emoticon' alt=';)' />

Complete problem, Thanks All.
I am try Event Before Add :
//UPDATE ANOTHER TABLE

$sql="UPDATE tb_stock SET saldo=saldo-".$values["qty"]." WHERE product_id='".$values["product_id"]."'";

$rs=CustomQuery($sql);
Success..