Salve e buongiorno a tutti.

Sto cercando di modificare una tabella con dati presi da un form ma i campi della tabella devo essere modificati solo se differenti da quelli già esistenti:

Codice PHP:
mysql_query("Upload archive SET if(Nome!=$nome, Nome=$nome), if(Cognome!=$cognome, Cognome=$cognome), if(Email!=$email, Email=$email), if(Testo!=$testo, Testo=$testo) Where IDMsg=$idmsg");
mi da questo errore:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near