我知道这个查询不正确,但我应该怎么写呢?
UPDATE OFFER SET
IF(St != 3, St = 2 AND View = '$userupdate' AND Date_V_E = '$date', '')
WHERE Id = '$entryID'
IF
应该是这样的:
if(St != 3){
St = 2;
View = '$userupdate';
Date_V_E = '$date';
}else{
//DO NOTHING
}
答案 0 :(得分:3)
UPDATE OFFER
SET St = 2,
View = '$userupdate',
Date_V_E = '$date'
WHERE Id = '$entryID'
and St <> 3