$query = sprintf('UPDATE user SET username = "%s",'.
     'password = "%s",'.'email = "%s",'.'is_active = %d'.
     'WHERE userid = %d',
     mysql_real_escape_string($this->username),
     mysql_real_escape_string($this->password),
     mysql_real_escape_string($this->email),
     $this->is_active,$this->userid);
                
         mysql_query($query) or die('fail:'.mysql_error());
报错是 fail: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 'userid = 97' at line 1