Asc/ Desc Not Working In Mysql Query In DataTable

Have you ever faced such kind of issue which looks like very easy but when you are fetching the data from MySQL, populating inside a loop with ASC or DESC keywords? But In datatable It will not work. Here Why Asc/Desc Not working In MySQL Query in Datatable Is Solved With Simple trick.. Just add a small Code of snippet and it will work like charm.



If you want to ASC order means 1 to 100… Then Use Below code.

If you want your order would be descending like 100… To 1, then use below code

 

Advertisements