我有一个问题,关于我是否只想通过一个命令更新 2 条记录,不可能这样做吗?
mysql_query("UPDATE damacaicheck SET trimresult = '$trim' where date = '$Current' and date = '$yesterdaydate'");
或
mysql_query("UPDATE damacaicheck SET trimresult = '$trim' where date in ('$Current','$yesterdaydate')");
最佳答案
不要使用date = '$Current' AND date = '$yesterdaydate'"
,而是使用date = '$Current' OR date = '$yesterdaydate'"
关于php - 在不同日期更新2条记录?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7328516/