我有以下声明来更新用户现金,但我希望这只是在第二个字段fqdate
为空时实际更新,但是下面不起作用:
UPDATE users SET cash = (cash+' . $rewardCash . '), fqdate = now() WHERE userid = ? AND ISNULL(fqdate)
答案 0 :(得分:1)
UPDATE users SET cash = (cash+' . $rewardCash . '), fqdate = now() WHERE userid = ? AND fqdate IS NULL