the column Read is the problem. Read is a reserved word in mysql and CANNOT be used as a column name.
Two ways to solve this:
Use backticks around all column / table names
mysql_query("UPDATE `mail` SET `read`='$num' WHERE `id`='$id'") or die (mysql_error());
the other is to change the name. You could append the tablename and an underscore to the fieldname(s)
mysql_query("UPDATE mail SET mail_read='$num' WHERE mail_id='$id'") or die (mysql_error());