Hi,
To prevent SQL injection attacks, we use PreparedStatements.
In an ORDER BY clause, we also set the sort order ASC or DESC via a ?
Unfortunately, if done so, this does not work.
When doing a log.debug, I see
ORDER BY 'sent_date' 'desc'
and the DESC is ignored by the DB and the results arrive as ASC.
When copying the log.debug query to the MySQL Query Browser, this behaviour
can be reproduced.
As soon as I change to
ORDER BY 'sent_date' desc
all is fine.
Any hints how to do this in jdbc?
Regards
Ralf