> Le 5 oct. 2017 à 20:45, Stephen Chrzanowski <pontia...@gmail.com> a écrit :
> Given the query:
> select EventID, Airline, ContactInfo,TicketID,CreateDate from tEvents where
> Resolved=:Resolved order by :OrderBy
> I wanted to bind :OrderBy with field names and conditions based on user
> preferences, but I think the bind converted my order rules into a string
> and ordered my results based on that string somehow.
> Am I looking at a wrapper limitation or is this something SQL won't do and
> I'll have to rely on concatenation? (Which I'm not bothered by since the
> sort options are hard coded)
SQLite query arguments are for values only: they can't be used as placeholders
for expressions such as a column name. Reference:
You're thus not facing a wrapper limitation: you do have to concatenate strings
in order to build your dynamic SQL query.
sqlite-users mailing list