Fix quoting of query by text.

This commit is contained in:
Klaas Freitag 2014-03-19 21:00:59 +01:00
parent c3cee3426e
commit eb59f98ec9

View file

@ -469,7 +469,7 @@ csync_file_stat_t *csync_statedb_get_stat_by_file_id(CSYNC *ctx,
}
if( ctx->statedb.by_fileid_stmt == NULL ) {
const char *query = "SELECT * FROM metadata WHERE fileid='?1'";
const char *query = "SELECT * FROM metadata WHERE fileid=?1";
rc = sqlite3_prepare_v2(ctx->statedb.db, query, strlen(query), &ctx->statedb.by_fileid_stmt, NULL);
if( rc != SQLITE_OK ) {