On Tue, Sep 13, 2011 at 4:36 AM, Baruch Burstein wrote:
> If I compile a SQL statement, can I immediately change that sql string?
> e.g., Is this allowed:
>
> sql = sqlite3_mprintf("select a from b where c = %Q;", d);
> sqlite3_prepare_v2(db, sql, -1, , 0);
>
If I compile a SQL statement, can I immediately change that sql string?
e.g., Is this allowed:
sql = sqlite3_mprintf("select a from b where c = %Q;", d);
sqlite3_prepare_v2(db, sql, -1, , 0);
sqlite3_step(stmt);
strcpy(a, (char *)sqlite3_column_text(stmt, 0));
sqlite3_free(sql); // or sql =
If I compile a SQL statement, can I immediately change that sql string?
e.g., Is this allowed:
sql = sqlite3_mprintf("select a from b where c = %Q;", d);
sqlite3_prepare_v2(db, sql, -1, , 0);
sqlite3_step(stmt);
strcpy(a, (char *)sqlite3_column_text(stmt, 0));
sqlite3_free(sql); // or sql =
3 matches
Mail list logo