使用php mysql更新表中的行 [英] Update row in table using php mysql
本文介绍了使用php mysql更新表中的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的查询在这里:
$ t1 =(从请求的
中选择quantity_app
,其中requested_id = $ _POST [hidden]) ;
$ t2 =更新仓库
设定数量=数量 - 。 $ t1;
此查询未运行请帮帮我,我不知道我做错了!
quantity_app列必须减去数量列
解决方案
t1 =(从请求的
中选择quantity_app
,其中requested_id =
_POST [hidden]);
t2 =更新仓库
设定数量=数量 - 。
my query is here:
$t1 = "(select quantity_app
from requested
where requested_id = $_POST[hidden])";
$t2 = "update warehouse
set quantity = quantity - " . $t1;
this query doesn't run please help me i don't know were i do it wrong!
the quantity_app column must subtract quantity column
解决方案
t1 = "(select quantity_app from requested where requested_id =
_POST[hidden])";
t2 = "update warehouse set quantity = quantity - " .
这篇关于使用php mysql更新表中的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文