0
Hello, so I want to do 1 player rank on my site, and I put the position of each player there, but it has 1 however, each position has its color, and in mysql is only the title name, as I do for it to pick 1 name and change the color.
Example: Director, he will leave <td style="color: orange;">Diretor</td>
public function RankSkyWars()
{
$stmt = $this->pdo->prepare("SELECT * FROM tskywars INNER JOIN tcommons ON tskywars.id = tcommons.id INNER JOIN permusers ON tcommons.id = permusers.id ORDER BY `solowins` DESC LIMIT 100");
$stmt->execute();
if($stmt->rowCount() == 0) { return ""; }
$fetch = $stmt->fetchAll(\PDO::FETCH_OBJ);
$return = "";
foreach ($fetch as $rs)
{
$deaths = "".number_format($rs->solodeaths, 0, ',', '.');
$wins = "".number_format($rs->solowins, 0, ',', '.');
$kills = "".number_format($rs->solokills, 0, ',', '.');
$coins = "".number_format($rs->coins, 0, ',', '.');
$return .= "<tr>
<td style=\"text-align: left;\" class=\"leaderboard-username\"><img src=\"https://minotar.net/helm/{$rs->name}/32.png\"> {$rs->name}</td>
<td style=\"text-align: left;\" class=\"leaderboard-stat\" id=\"cargo\">{$rs->groups}</td>
<td style=\"text-align: left;\" class=\"leaderboard-stat\">$wins</td>
<td style=\"text-align: left;\" class=\"leaderboard-stat\">$kills</td>
<td style=\"text-align: left;\" class=\"leaderboard-stat\">$deaths</td>
<td style=\"text-align: left;\" class=\"leaderboard-stat\">$coins</td>
</tr>";
}
return $return;
}
Vlw msm, +1, I love you
– Matheus Ferreira
@Matheusferreira kkkk quiet
– Andrei Coelho