load fast databtables big data
<table id="myTable" class="display table table-bordered">
<thead> <tr> <th>Account No</th> <th>Consumer Name</th> <th>ADDRESS</th> <th>Amount</th> </tr> </thead>
<tbody id="data" > <?php include("fetch2.php"); ?> </tbody>
</table>
fetch2.php:
<?php
$statement = oci_parse($conn, "SELECT * FROM ethanhost.FDISCO ORDER BY CNAME ASC OFFSET 0 ROWS FETCH NEXT 500000 ROWS ONLY"); //<= this where i limit the rows
oci_set_prefetch($statement, 50);
oci_execute($statement);
while($row = oci_fetch_array($statement)) {
echo "<tr>";
echo "".$row['ACNT_CODE']."";
echo "".$row['CNAME']."";
echo "".$row['CADDRESS']."";
echo "".$row['AMOUNT']."";
echo "";
}
oci_free_statement($statement);
?>
and my script for datatable:
Plain text
1
2
3
4
$(document).ready( function () {
$('#myTable').DataTable({
});
} );