SQLite problem with some parameterized queries

Posted by Trevor Balcom on Stack Overflow See other posts from Stack Overflow or by Trevor Balcom
Published on 2010-06-09T16:51:07Z Indexed on 2010/06/09 16:52 UTC
Read the original article Hit count: 194

Filed under:
|

I am having some trouble using SQLite and parameterized queries with a few tables. I have noticed some queries using the "SELECT * FROM Table WHERE row=?" are returning 1 row when there should be more rows returned. If I change the parameterized query to "SELECT * FROM Table WHERE row='row'" then the correct number of rows is returned.

Does anyone know why sqlite3_step would return only 1 row when using a parameterized query vs. using the same query in a traditional non-parameterized way?

I am using a very thin C++ wrapper around SQLite3. I suspect there could be a problem with the wrapper, but this problem only exists on a few tables. It makes me wonder if there is something wrong with the way those tables are setup. Any advice is appreciated.

© Stack Overflow or respective owner

Related posts about c++

Related posts about sqlite3