1
I would like to create several tables with three lines each. Example:
GROUP A
TEAM 1
TEAM 2
TEAM 3
GROUP B
TEAM 4
TEAM 5
TEAM 6
Follow my code:
<?php include 'masterpage.php';
include 'conexao.php';
$sql = "SELECT G.NOME_CHAVE, G.ID_EQUIPE, E.ID_EQUIPE, E.NOME
FROM Grupos_Sorteados AS G
INNER JOIN Equipe AS E
ON G.ID_EQUIPE = E.ID_EQUIPE
ORDER BY NOME_CHAVE";
$resultado = mysqli_query($conn, $sql);
?>
<div id="tab" class="row">
<div class="col-sm-6">
<div class="table-responsive" style="font-size: 14px !important;">
<p>Grupo: <?php echo $chave?> </p>
<table id="tabelaEquipe" class="table table-borderless table-striped table-earning">
<?php
while($dados = mysqli_fetch_array($resultado)){
$chave = $dados['NOME_CHAVE'];
$equipe = $dados['NOME'];
?> <thead>
<tr>
<th>Equipe</th>
<th>Chave</th>
</tr>
</thead>
<tbody>
<tr>
<td><?php echo $equipe ?></td>
<td><?php echo $chave?></td>
</tr>
</tbody><?php } ?>
</table>
</div>
</div>
[![inserir a descrição da imagem aqui][1]][1]
<script>
function editarEquipe(){
$dados = mysqli_fetch_array($resultado)
var nome = <?php echo $nome ?>;
}
</script>
<?php include 'footer.php'; ?>
EDIT*
I got the following result, but it’s still not what I expect. I need to put 3 teams inside a table only. Can someone give me a light?
It worked! Thanks for the help.
– Marcos Vinicius Leão
I’m glad I could help.
– osor1o