I am just now getting around to learning Swift and XCode. I am having a problem with 'LIKE'. When I do this:

let queryString = "select name, phone, street, city, state from phone where name like '%?%'"

And then this: if sqlite3_bind_text(stmt, 1, name, -1, SQLITE_TRANSIENT) != SQLITE_OK {do whatever}

I get an error "column index out of range". The rest of the code is fine. When I do this:

let queryString = "select name, phone, street, city, state from phone where name = ?"

everything works just fine. What am I missing?

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to