> Have the C program include the % in the text parameter:
>
> sqlite3_bind_text( stmt,
>        sqlite3_bind_parameter_index(stmt, "%:bp%"),
>               "%bar%", ......

Just out of interest would there be a way to use a variable here with
the % wildcards as in:
char* myvar = "teststr";

sqlite3_bind_text( stmt,
                           sqlite3_bind_parameter_index(stmt, ":bp"),
                          "%myvar%", ......

Other than the literal string?

>
> Or rewrite the SQL as
>
> char *sql = "SELECT * FROM foo WHERE name LIKE '%' || :bp || '%'";

Thank you very much for this.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to