[英]How to combine multiple UPDATE statement in one query?
$conn->query("UPDATE users SET totalClicks = totalClicks + 1 WHERE id = '$uid'");
$conn->query("UPDATE link SET clicks = clicks + 1 WHERE userid = '$uid' AND id = '$id'");
$conn->query("UPDATE data SET total_actions_3 = total_actions_3 + 1");
I want to put all these 3 queries into one prepared statement, how to do that ? 我想将所有这3个查询放入一个准备好的语句中,该怎么做?
Combining them is not a good idea. 组合它们不是一个好主意。 Keep them the way they are.
保持原样。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.