yop silahkan om
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>TESTING | Data Tables</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
</head>
<body>
<table id="example1" class="table table-bordered table-striped">
<thead>
<tr>
<th>No</th>
<th>IP Adress</th>
<th>AP Name</th>
<th>Group Name</th>
<th>Location</th>
<th>Comment</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
include("koneksi.php");
$query = "select * from listip order by groupname, apname";
$result = mysqli_query($mysqlId, $query);
$no = 0;
while( list($id, $ipaddr, $apname, $groupname, $location, $comment) = mysqli_fetch_row($result) ) {
$no++;
$bg = $no%2 ? "bgcolor=#fefefe" : "bgcolor=#dfd";
echo "<tr $bg><td align=right> $no </td>
<td> $ipaddr </td>
<td> $apname </td>
<td> $groupname </td>
<td> $location </td>
<td> $comment </td>
<td><align=center>
<a href='showjoint.php?ipaddr=$ipaddr'>Show</a>
<a href='chpwpa1.php?ipaddr=$ipaddr'>Key</a>
<a href='reboot.php?ipaddr=$ipaddr'>Reboot</a>
</td>
</tr>\n";
}
mysqli_free_result($result);
?>
</tbody>
</table>
</div>
<script src="plugins/jQuery/jQuery-2.1.4.min.js"></script>
<script src="plugins/datatables/jquery.dataTables.min.js"></script>
<script src="plugins/datatables/dataTables.bootstrap.min.js"></script>
<!-- page script -->
<script>
$(function () {
$("#example1").DataTable();
$('#example2').DataTable({
"paging": true,
"lengthChange": false,
"searching": false,
"ordering": true,
"info": true,
"autoWidth": false
});
});
</script>
</body>
</html>
Harusnya sich sdh order by ombiar nomer berurutan coba pake order by di sqlnya?
$query = "select * from listip order by groupname, apname";
<script src="plugins/datatables/jquery.dataTables.min.js"></script>