There is a dynamic data table I found on internet from a template ( aquincum ) , there are css files and js files coming with it. The problem is that the data table is sorting data by the first table column by default, not considering any sorting from my database query. I found in the js file this code :
$(function() {
...
//===== Dynamic data table =====//
oTable = $('.dTable').dataTable({
"bJQueryUI": false,
"bAutoWidth": false,
"sPaginationType": "full_numbers",
"sDom": '<"H"fl>t<"F"ip>'
});
...
});
So what should I add to this code in order to be able to sort by date in descending order ?
This is a jQuery plugin and extensive support is provided on its official website. It has parameter to disable sorting on some or all columns and in same way you can set flags for sorting the columms separately.
For full documentation please click here.