Skip to content

using variable in ORDER BY #998

Answered by zann1x
dc-price asked this question in Q&A
Sep 22, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dc-price
Comment options

Answer selected by dc-price
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants