|
@@ 121-136 (lines=16) @@
|
| 118 |
|
return $data; |
| 119 |
|
} |
| 120 |
|
|
| 121 |
|
function getRecentMythic($mythic_pokemons) { |
| 122 |
|
$req = "SELECT DISTINCT pokemon_id, encounter_id, disappear_time, last_modified, (CONVERT_TZ(disappear_time, '+00:00', '".self::$time_offset."')) AS disappear_time_real, |
| 123 |
|
latitude, longitude, cp, individual_attack, individual_defense, individual_stamina |
| 124 |
|
FROM pokemon |
| 125 |
|
WHERE pokemon_id IN (".implode(",", $mythic_pokemons).") |
| 126 |
|
ORDER BY last_modified DESC |
| 127 |
|
LIMIT 0,12"; |
| 128 |
|
$result = $this->mysqli->query($req); |
| 129 |
|
$data = array(); |
| 130 |
|
if ($result->num_rows > 0) { |
| 131 |
|
while ($row = $result->fetch_object()) { |
| 132 |
|
$data[] = $row; |
| 133 |
|
} |
| 134 |
|
} |
| 135 |
|
return $data; |
| 136 |
|
} |
| 137 |
|
|
| 138 |
|
/////////////////// |
| 139 |
|
// Single Pokemon |
|
@@ 425-436 (lines=12) @@
|
| 422 |
|
return $history; |
| 423 |
|
} |
| 424 |
|
|
| 425 |
|
public function getHistoryForGymPokemon($pkm_uids) { |
| 426 |
|
$req = "SELECT DISTINCT pokemon_uid, pokemon_id, cp, trainer_name |
| 427 |
|
FROM gympokemon |
| 428 |
|
WHERE pokemon_uid IN ('".implode("','", $pkm_uids)."') |
| 429 |
|
ORDER BY FIND_IN_SET(pokemon_uid, '".implode(",", $pkm_uids)."')"; |
| 430 |
|
$result = $this->mysqli->query($req); |
| 431 |
|
$pokemons = array(); |
| 432 |
|
while ($data = $result->fetch_object()) { |
| 433 |
|
$pokemons[] = $data; |
| 434 |
|
} |
| 435 |
|
return $pokemons; |
| 436 |
|
} |
| 437 |
|
|
| 438 |
|
|
| 439 |
|
/////////// |