Zettai Muri 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%", ..
>
> Ot
> 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";
sqlite
On Sat, 18 Jun 2011 17:01:41 +1000, Zettai Muri
wrote:
>Hi All,
>
>Could someone tell me how to use bound parameters with LIKE and where
>the % wildcards should be placed?
>
>I currently have the following code extract:
>char *sql = "SELECT * FROM foo WHERE name LIKE :bp";
>
>rc = sqlite3_prepare
Hi All,
Could someone tell me how to use bound parameters with LIKE and where
the % wildcards should be placed?
I currently have the following code extract:
char *sql = "SELECT * FROM foo WHERE name LIKE :bp";
rc = sqlite3_prepare_v2(db, sql, strlen(sql), &stmt, &tail);
sqlite3_bind_text( stmt,
4 matches
Mail list logo