Tuesday 15 July 2014

sql - mysql use IF after SET only if condition is true -


I know this query is not correct, but how should I write it?

  If the UPDATE offer is set (=! = 3, cents = 2 and see = '$ userupdate' and date_V_E = '$ date', '') WHERE id = '$ entryID'   

code> if should be like this:

  if (St! = 3) {St = 2; See = '$ userupdate'; Date_V_E = '$ date'; } Else {// DOTHTHING}    

  update offset set = 2 = '$ User update', date_V_E = '$ date' WHERE id = '$ entry' and st & lt; & Gt; 3    

No comments:

Post a Comment