PHP - Paginacion en Datatable con consulta Oracle

 
Vista:

Paginacion en Datatable con consulta Oracle

Publicado por marcos (4 intervenciones) el 27/03/2017 15:01:51
Buenas.
Quiero realizar la paginación en el volcado de unos datos desde una consulta de Oracle en un datatable Jquery pero no se muy bien como lo tengo que realizar. Os dejo el codigo que tengo para ver si me podeis guiar un poco.


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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>
    <html>
 
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title></title>
        <?php include './header.php' ?>
    </head>
 
    <body class="hold-transition skin-blue sidebar-mini">
        <div class="wrapper">
            <?php include './header2.php' ?>
            <?php include './menu.php' ?>
 
            <!-- Content Wrapper. Contains page content -->
            <div class="content-wrapper">
                <!-- Content Header (Page header) -->
 
 
      <section class="content"><br>
<?php
include './conexion.php';
$base = new Database();
$con = $base->connect();
$query = "SELECT VA QUI";
$stid = oci_parse($con, $query);
oci_execute($stid);
?>
 <div class="box box-info">
 <div class="box-header">
   <div class="box-body">
   <table id="tabla" class="table table-bordered table-striped">
   <thead>
   <tr>
    <th>Nombre</th>
    <th>Colegiado</th>
    </tr>
    </thead>
    <?php while (($row = oci_fetch_array($stid, OCI_NUM)) != false) { ?>
    <tbody>
    <tr class="info">
        <td><?php echo $row['0'] ?></td>
        <td><?php echo $row['1'] ?></td>
    </tr>
    </tbody>
    <?php } ?>
   </table>
   </div>
  </div>
  </div>
  </div>
   <?php echo "<b>Numero de resultados:</b> ".ocirowcount($stid);?>
 </section>
    <?php include './footer.php' ?>
 
    <script>
     $(document).ready(function() {
    $('#tabla').DataTable( {
        "pagingType": "full_numbers"
    } );
} );
       </script>
 
  </body>
</html>
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