 <?php
require("../../config/koneksi.php");
require("../../config/function.php");
require("../../config/crud.php");
?>	

                    <div class='table-responsive'>
                        <table style="font-size: 11px" id='datatable1' class='table table-hover'>
                            <thead>
                                <tr>
                                    <th width='3%'>#</th>
                                    <th>Nama pemilih</th>
                                    <th>Kelas</th>
                                    <th>Kelamin</th>

                                </tr>
                            </thead>
							 <tbody>
                            <?php
							$no=0;
							$query = mysqli_query($koneksi, "select * FROM datapemilihan ORDER BY idpemilihan DESC LIMIT 10");
							 while ($pemilih = mysqli_fetch_array($query)) {
							$siswa=fetch($koneksi,'siswa',['id_siswa'=>$pemilih['idpemilih']]);
							 $no++;
                            ?>
                                <tr>
                                    <td><?= $no; ?></td>
                                    <td><?= $siswa['nama'] ?></td>
                                    <td><?= $siswa['id_kelas'] ?></td>
								<td><?= $siswa['jenis_kelamin'] ?></td>
                                    
						   <?php } ?>
                            


                        </tbody>
                        </table>
                    
                </div>