0

我知道这个查询不正确,但我应该怎么写呢?

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
}
4

1 回答 1

3
UPDATE OFFER 
SET St = 2, 
    View = '$userupdate', 
    Date_V_E = '$date'
WHERE Id = '$entryID'
and St <> 3
于 2013-06-20T17:55:03.323 回答