-
Notifications
You must be signed in to change notification settings - Fork 0
/
consulta.php
31 lines (29 loc) · 1.06 KB
/
consulta.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<table class="table table-bordered">
<thead>
<tr>
<th>matricula</th>
<th>Nombre</th>
<th>Correo</th>
<th colspan="2">Opciones</th>
</tr>
</thead>
<tbody>
<?php
include_once("conexion.php");
$sql = "SELECT matricula, Nombre, correo FROM alumnos where grupos_idgrupos like '".$grp."' ORDER BY matricula DESC";
$resultset = mysqli_query($conn, $sql) or die("database error:". mysqli_error($conn));
if(mysqli_num_rows($resultset)) {
while( $rows = mysqli_fetch_assoc($resultset) ) {
?>
<tr>
<td><?php echo $rows['matricula']; ?></td>
<td><?php echo $rows['Nombre']; ?></td>
<td><?php echo $rows['correo']; ?></td>
<td style="text-align: center;"><a onclick="editaDato(<?=$rows['matricula']; ?>, '<?=$rows['Nombre']; ?>', '<?=$rows['correo']; ?>');"><img alt="Editar" class="icon_tab" src="imgs/ico_edit.png"></a></td>
<td style="text-align: center;"><a onclick="borrarDato(<?=$rows['matricula'];?>);"><img alt="Borrar" class="icon_tab" src="imgs/icoEliminaAlumno.png"></a></td>
</tr>
<?php } } else { ?>
<tr><td colspan="5">No hay alumnos en lista.....</td></tr>
<?php } ?>
</tbody>
</table>