我的情况是这样,即在选择的询问中,我想使用国家抽样变量:
NSString *arrayThemeList=@"element1, element2, element3";
if (sqlite3_open(dbpath, &contactDB) == SQLITE_OK)
{
NSString *querySQL = [NSString stringWithFormat:
@"SELECT * from table1 where type IN ?"];
const char *query_stmt = [querySQL UTF8String];
if (sqlite3_prepare_v2(contactDB,
query_stmt, -1, &statement, NULL) == SQLITE_OK)
{
sqlite3_bind_text(statement, 1, [arrayThemeList UTF8String], -1, SQLITE_TRANSIENT);
while (sqlite3_step(statement) == SQLITE_ROW)
{
//Do the rest work...
很显然,我想将arrayThemeList
输入到bind
的查询中。
However, this seems not to be giving the wanted result, is there anything i am doing wrong? Thanx in advance:)