Skip to content

Building query for ORDER BY ? DESC/ASC doesn't seem to use the values #2726

Answered by sidorares
k3rne1pan1c asked this question in Q&A
Discussion options

You must be logged in to vote

you might want to use escapeId here - https://github.com/mysqljs/mysql?tab=readme-ov-file#escaping-query-identifiers

Note that you can't have this as a parameter in a real prepared statement ( .query is a client side query building, not a real server side parametrized statement )

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@sidorares
Comment options

Answer selected by k3rne1pan1c
@sidorares
Comment options

@k3rne1pan1c
Comment options

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
Converted from issue

This discussion was converted from issue #2724 on June 03, 2024 10:50.