简体   繁体   English

MySQL更新表行,其中列等于php变量

[英]MySQL update table row where column equals php variable

I know that mysql_* is obsolete today, but I need to use it anyway at the moment. 我知道mysql_*已过时,但是我现在仍然需要使用它。 Could you please tell me how can I update a table where column equals php variable? 您能告诉我如何更新表等于php变量的表吗?

$qid = $_POST['idc'];
mysql_query("UPDATE `db`.`table` SET `status` = 'canceled' WHERE idc = $qid");

Thank you 谢谢

 mysql_query("UPDATE `db`.`table` SET `status` = 'canceled' WHERE `idc` = '$qid'");

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM