Reputation: 1521
I know this query is not correct, but how should I write it?
UPDATE OFFER SET
IF(St != 3, St = 2 AND View = '$userupdate' AND Date_V_E = '$date', '')
WHERE Id = '$entryID'
The IF
should be like this:
if(St != 3){
St = 2;
View = '$userupdate';
Date_V_E = '$date';
}else{
//DO NOTHING
}
Upvotes: 0
Views: 73
Reputation: 204746
UPDATE OFFER
SET St = 2,
View = '$userupdate',
Date_V_E = '$date'
WHERE Id = '$entryID'
and St <> 3
Upvotes: 3