Hi Everyone, I would like to sort my table by date but I couldn't sort it. Hope you guys can help me.
Here's my code
<table class="table table-striped table-bordered bootstrap-datatable datatable responsive">
<thead>
<tr>
<th>Name</th>
<th>Action</th>
<th>Date and Time</th>
</tr>
</thead>
<tbody>
<?php
$result= mysql_query("select * from history order by history_id DESC ") or die (mysql_error());
while ($row= mysql_fetch_array ($result) ){
$id=$row['history_id'];
?>
<tr>
<td><?php echo $row['data']; ?></td>
<td><span class="label-primary label label-default"><?php echo $row['action']; ?></span></td>
<td><span class="label-success label label-default"><?php echo date("M d, Y H:i:s",strtotime($row['date'])); ?></span></td>
</tr>
<?php } ?>
</tbody>
</table>