it does not order me correctly server side
it does not order me correctly server side
cris19n
Posts: 55Questions: 18Answers: 0
As you can see, I am sorting by data 3 from highest to lowest and data 5 from lowest to highest.
but for some reason data 3 keeps starting from lowest to highest.
I do not know why it does not work
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
With server side processing enabled the sorting, searching and paging functions are the responsibility of your server script. Are you using a Datatables provided script? The server script will need to be debugged to find the problem.
Kevin
this is my php code
Just to confirm my understanding of the issue - the problem is that it is not doing multi-column sorting as you expect?
The reason for that is that your SQL query is only doing a single column sort, and as Kevin says, when server-side processing, it is the responsibility of the server script to do the sort:
So to do multi-column sorting, you would need to handle the array of sorting data that DataTables submits.
This is the method in our demo SSP script to handle that, which might be of some use to you.
Allan