HTML - NO CUENTA LOS REGISTROS CON DATATABLE

 
Vista:
sin imagen de perfil
Val: 1
Ha aumentado su posición en 70 puestos en HTML (en relación al último mes)
Gráfica de HTML

NO CUENTA LOS REGISTROS CON DATATABLE

Publicado por Pierre (1 intervención) el 21/01/2020 18:50:24
Help Me! Al listar datos de una tabla con while por MYSLQI_FECTH_ROW, no me cuenta los registros con datatable, ¿alguna solución?



Sin-titaaaulo

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
32
33
34
35
36
37
38
39
40
41
42
43
44
<table class="table" id="tabla">
      <thead class="thead-dark">
        <tr>
          <th scope="col">Código</th>
          <th scope="col">Carrera</th>
          <th scope="col">Módulo</th>
          <th scope="col">Horas</th>
          <th scope="col"></th>
          <th scope="col"></th>
        </tr>
      </thead>
      <?php
 
        while($ver=mysqli_fetch_row($result)){
 
          $datos=$ver[0]."||".
                 $ver[1]."||".
                 $ver[2]."||".
                 $ver[3];
        ?>
      <tbody>
      <tr>
        <td><?php echo $ver[0]; ?></td>
        <td><?php echo $ver[1]; ?></td>
        <td><?php echo $ver[2]; ?></td>
        <td><?php echo $ver[3]; ?></td>
        <td>
         <button class="btn btn-warning" onclick="mostrarModulo('<?php echo $datos ?>')" data-toggle="modal" data-target="#modalEdicion">Editar<i class="fa fa-edit"></i></button>
        </td>
        <td>
          <button class="btn btn-danger" onclick="eliminarModSiNo('<?php echo $ver[0] ?>')" >Eliminar <i class="fa fa-trash"></i></button>
        </td>
      </tr>
      <?php } ?>
      </tbody>
    </table>
 
<script>
$(document).ready(function() {
 
  $("#tabla").DataTable();
});
 
</script>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder