In the update cose, look for the following line:
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
edit it to:
die($WA_Sql);
$MM_editCmd = mysql_query($WA_Sql, $WA_connection) or die(mysql_error());
this will write the sql to the screen and stop processing to help debug the issue.