You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have issue with multiple value order issue
for example while using query like this : SELECT * FROM ticket_table ORDER BY status='Open' DESC, status='In Progress' DESC, status='On Hold' DESC, status='Closed' DESC"`
Which the result should be show on following order
No Name Status
5 Blabla Open
2 Blabla Open
3 Blabla Open
6 Blabla In Progress
7 Blabla In Progress
1 Blabla On Hold
8 Blabla On Hold
but it displayed in normal squence instead, it seem in generate() method set a new index instead using as is as result from mysql
Thanks!
The text was updated successfully, but these errors were encountered:
Actually, it is the expected behaviour of the library. That's how sorting works.
If you want to keep sorting as it is on init, you should leave a blank array to "order" settings of datatables in javascript.
"order": []
I think it is the best way to set a default sorting order is setting "order" variable in javascript, and remove "order by" statements from sql, so php library can add the statement accordingly.
Thank you!, it seem I missed the "order" part and "aaSorting" part, what I expect is the library will do the ordering part for init, but the js configuration mess it up, I will close the issue now thanks!
Dear Maintainer,
I have issue with multiple value order issue
for example while using query like this :
SELECT * FROM ticket_table ORDER BY
status='Open' DESC,
status='In Progress' DESC,
status='On Hold' DESC, status
='Closed' DESC"`Which the result should be show on following order
No Name Status
5 Blabla Open
2 Blabla Open
3 Blabla Open
6 Blabla In Progress
7 Blabla In Progress
1 Blabla On Hold
8 Blabla On Hold
but it displayed in normal squence instead, it seem in generate() method set a new index instead using as is as result from mysql
Thanks!
The text was updated successfully, but these errors were encountered: