how to use dynamic sorting and order? #655
-
i have something like this: but when i run it, i got an error says: I've searching on google/this repo, but i have no clue how i can achieve it. thank you. |
Beta Was this translation helpful? Give feedback.
Answered by
porsager
Aug 2, 2023
Replies: 1 comment 2 replies
-
I searched for "dynamic order by" on this repo, and this was the first issue in the results : #174 I think you should find your answer there ;) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No, the issue is that your orderby column is sent as a parameter. Here is your sample query which should work (notice orderby is inside
sql()
):Of course you could make the order by clause more dynamic, but that's almost always up to the specific userland implementation requirements. Imagine something like this: