function getLeaveCount($playerLogin, $lobbyLogin)
	{
		return $this->db->query(
				'SELECT count(*) FROM Players P '.
				'INNER JOIN Matches M ON P.matchId = M.id '.
				'WHERE P.login = %s AND P.`state` IN (%s) AND M.lobbyLogin = %s '.
				'AND M.state NOT IN (%s) '.
				'AND DATE_ADD(M.creationDate, INTERVAL 1 HOUR) > NOW()',
				$this->db->quote($playerLogin),
				implode(',', array(PlayerInfo::PLAYER_STATE_NOT_CONNECTED, PlayerInfo::PLAYER_STATE_QUITTER, PlayerInfo::PLAYER_STATE_GIVE_UP, PlayerInfo::PLAYER_STATE_REPLACED)),
				$this->db->quote($lobbyLogin),
				implode(',', array(Match::PLAYER_CANCEL))
			)->fetchSingleValue(0);
	}