Zettai Muri <zettaim...@gmail.com> wrote:
> 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?

char myexpandedvar[10];
sprintf(myexpandedvar, "%%%s%%", myvar);
sqlite3_bind_text(..., myexpandedvar, ...);

In other words, you can use string manipulation facilities available in your 
programming language.
-- 
Igor Tandetnik

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

Reply via email to