Order example (a PHP class method)

Order example (a PHP class method)

WakaruWakaru Posts: 13Questions: 5Answers: 0

Could someone please provide an example of how to use order -method (http://editor.datatables.net/docs/current/php/source-class-DataTables.Database.Query.html#326). I tried these with no luck:

->order( 'ID DESC' )
->order( $order = 'ID' )
->order( $order = array('ID') )

Thanks!

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    ->order( 'ID DESC' ) should work okay. What happens when you use it?

    Allan

  • WakaruWakaru Posts: 13Questions: 5Answers: 0

    When trying to load dt with order -method enabled, it gives invalid JSON response -error message.

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    What is the error message contained the the data that is returned from the Ajax call?

    Allan

This discussion has been closed.