-
I am trying to avoid duplicating code merely to have a different ORDER BY clause . This compiles and runs but doesn't sort.
Thanks for any consideration. David |
Beta Was this translation helpful? Give feedback.
Answered by
zann1x
Sep 22, 2022
Replies: 1 comment 1 reply
-
Placeholders in prepared statements are meant to be used for values, not column names. You are limited by the database capabilities here. I would have expected a runtime exception thrown by the database, though. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
dc-price
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Placeholders in prepared statements are meant to be used for values, not column names. You are limited by the database capabilities here.
I would have expected a runtime exception thrown by the database, though.