diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/clog.c | 4 | ||||
-rw-r--r-- | src/queries.h | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -490,8 +490,8 @@ int sql_update(const char *id, const char *title, const char *body) { } err = kore_pgsql_query_params( - &sql, q_update_entry, 0, 3, KORE_PGSQL_PARAM_TEXT(title), KORE_PGSQL_PARAM_TEXT(body), - KORE_PGSQL_PARAM_TEXT(id) + &sql, q_update_entry, 0, 4, KORE_PGSQL_PARAM_TEXT(title), KORE_PGSQL_PARAM_TEXT(body), + KORE_PGSQL_PARAM_TEXT(body), KORE_PGSQL_PARAM_TEXT(id) ); if (err == KORE_RESULT_ERROR) { kore_pgsql_logerror(&sql); diff --git a/src/queries.h b/src/queries.h index 1246091..f406434 100644 --- a/src/queries.h +++ b/src/queries.h @@ -24,8 +24,8 @@ const char *q_select_entries = const char *q_update_entry = "UPDATE entries " -"SET title = $1, body = $2, updated_at = NOW() " -"WHERE id = $3 " +"SET title = $1, body = $2, updated_at = NOW(), search_vector = TO_TSVECTOR('english', $3) " +"WHERE id = $4 " "RETURNING id;"; // const char *q_delete_entry = |