Witam,
mam problem potrzebuje pobrać wyniki z mysql z 12 etapów i wyśwetlić je w formie etap 1 wyniki etap 2 wyniki itd.
wszysto jest w jednej tabeli tzn
mamy tak
id|id_zawodnika|id_konkurencji|etap|wynik
}
<?php foreach($wyniki as $r): for($s=1; $s<=12; $s++): if($r['stage'] == $s): endif; endfor; endforeach; ?>
$stage = null; foreach($wyniki as $r): echo '<table width="100%" style="border:1px solid #000" rules="all"> <tr> <td>L.P</td> <td>Nazwisko</td> <td>Imię</td> <td>Alias</td> <td>Wynik</td> </tr>'; if($r['stage'] != $stage): endif; endforeach;