/**
  * 
  * @param string $lobbyLogin
  * @param string $scriptName
  * @param string $titleIdString
  * @param int $lastId
  * @return type
  */
 function getLatestMasters($lobbyLogin, $scriptName, $titleIdString, $lastId)
 {
     return $this->db->execute('SELECT login, nickName, ladderPoints, id FROM Masters WHERE lobbyLogin = %s AND scriptName = %s AND titleIdString = %s AND id > %d ORDER BY id DESC LIMIT 0,18', $this->db->quote($lobbyLogin), $this->db->quote($scriptName), $this->db->quote($titleIdString), $lastId)->fetchArrayOfAssoc();
 }
Exemplo n.º 2
0
 protected function getNonAnsweredLinked($allyLogin)
 {
     $logins = $this->db->execute('SELECT A1.playerLogin ' . 'FROM Allies A1 ' . 'LEFT JOIN Allies A2 ON A1.allyLogin = A2.playerLogin ' . 'AND A1.lobbyLogin = A2.lobbyLogin AND A1.scriptName = A2.scriptName AND A1.titleIdString = A2.titleIdString ' . 'WHERE A1.allyLogin = %s AND (A1.playerLogin != A2.allyLogin OR A2.allyLogin IS NULL) ' . 'AND A1.lobbyLogin = %s AND A1.scriptName = %s AND A1.titleIdString = %s', $this->db->quote($allyLogin), $this->db->quote($this->lobbyLogin), $this->db->quote($this->scriptName), $this->db->quote($this->titleIdString))->fetchArrayOfSingleValues();
     return array_filter($logins, array($this, 'isPlayerConnected'));
 }