MatchMakingLobby/Services/MatchMakingService.php
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);
	}
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);
	}
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 ) ; }
Get the number of time the player quit a match for this lobby
@param string $playerLogin
@return int
Get the number of time the player quit a match for this lobby