0
I need the help of friends.
I created an ordered table of teams from highest to lowest score.
I wish there was a qualifying order with the 1st, 2nd, 3rd, etc... on the left side of the teams, according to the scores.
Like, the highest score in 1st, second in 2nd, third in 3rd and so on.
But I have no idea how to do it.
But as there are changes in the scores during the championship, the positions alternate.
If anyone can give me an idea or even where I can figure out how to do it, I would be most grateful!!!
Below put the aquivo I’m using.
<table>
<tr>
<td align="center" width="120">Nome</td>
<td align="center" width="120">Time</td>
<td align="center" width="120">Pontuações</td>
</tr>
<?php
$sql = $db->query("SELECT * FROM cadastro ORDER BY pontos DESC");
foreach ($sql as $res){
echo '<tr style="border-bottom: 1px solid black;">
<td width="350" align="left" style="font-size: 0.8em; font-weight: bold;">'.$res["name"].'</td>
<td width="150" align="center"><img style="height:auto; width:50%; max-width:150px;border-radius: 10px;" src="'.$res["end_t_cartola"].'/'.$res["t_cartola"].'"/></td>
<td align="center">'.$res["pontos"].'</td>
</tr>';
}
?>
</table>
At the moment the table looks like this:
But I’d like to keep it that way:
I believe that I will have to create a new taela, but I have no idea how to make the two work together.
HELP friend...rsrs...
Thank you for your attention!
duly corrected.
– Alexandre Guerreiro
Thank you very much Alexandre Guerreiro, it worked perfect!!!
– Murilo