[Interest] QSQLQuery bindValue to SELECT WHERE IN

Witold E Wolski wewolski at gmail.com
Tue Apr 9 17:35:14 CEST 2013


Trying to bind a value to :

SELECT * from features WHERE id IN (:ids)


I tried 2 versions:
First, build a list with the ids I want to select.
Creating a QList<QVariant> qlist;
Second version building a QString (i.e. "1,2,3")
Than I bind it to the query above
query.bindValue(":ids",qlist);


But unfortunately with neither I get result. No errors too.

executing a query
SELECT * from features WHERE id IN (1,2,3)
works fine.


Can anyone please tell me the right solution please?

Best



-- 
Witold Eryk Wolski

Triemlistrasse 155
8047 Zuerich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130409/26259cad/attachment.html>


More information about the Interest mailing list