SQL ORDER BY using iSortCol_

SQL ORDER BY using iSortCol_

nufftenthousandnufftenthousand Posts: 1Questions: 0Answers: 0
edited June 2011 in DataTables 1.8
I've just started using DataTables with server-side processing, and it's great. The problem I'm having is that I have no idea how to use iSortCols, iSortCol_, and sSortDir_.

I'm trying to get the results of the SQL query to be ordered by column 4 in descending order, then column 0 in ascending order, then column 1 in ascending order. Basically trying to get "ORDER BY col4 DESC, col0, col1" as the default when the table loads.

I'm using the demo php code to proccess this
[code]
if ( isset( $_GET['iSortCol_0'] ) )
{
$sOrder = "ORDER BY ";
for ( $i=0 ; $i
This discussion has been closed.