|
@@ 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 |
|
@@ 446-457 (lines=12) @@
|
| 443 |
|
return array("last_page" => $last_page, "data" => $history); |
| 444 |
|
} |
| 445 |
|
|
| 446 |
|
private function getHistoryForGymPokemon($pkm_uids) { |
| 447 |
|
$req = "SELECT DISTINCT pokemon_uid, pokemon_id, cp, trainer_name |
| 448 |
|
FROM gympokemon |
| 449 |
|
WHERE pokemon_uid IN ('".implode("','", $pkm_uids)."') |
| 450 |
|
ORDER BY FIND_IN_SET(pokemon_uid, '".implode(",", $pkm_uids)."')"; |
| 451 |
|
$result = $this->mysqli->query($req); |
| 452 |
|
$pokemons = array(); |
| 453 |
|
while ($data = $result->fetch_object()) { |
| 454 |
|
$pokemons[$data->pokemon_uid] = $data; |
| 455 |
|
} |
| 456 |
|
return $pokemons; |
| 457 |
|
} |
| 458 |
|
|
| 459 |
|
|
| 460 |
|
/////////// |