$sql = sprintf("UPDATE file SET mimetype=null,title=null,size=null,protected=null WHERE id=%d",$f->id);