From: Olaf Wintermann Date: Mon, 7 Apr 2025 20:28:08 +0000 (+0200) Subject: fix SQL_ATTACHMENT_NEW query parameters X-Git-Url: https://uap-core.de/gitweb/?a=commitdiff_plain;h=f56e74c8a8af4b3a32625f509e8066d2b5b32372;p=note.git fix SQL_ATTACHMENT_NEW query parameters --- diff --git a/application/store.c b/application/store.c index e26a93d..0c1aff7 100644 --- a/application/store.c +++ b/application/store.c @@ -637,9 +637,9 @@ static int qthr_save_attachment(SaveAttachmentJob *job) { q = connection->createQuery(connection, NULL); dbuQuerySetSQL(q, SQL_ATTACHMENT_NEW); dbuQuerySetParamInt64(q, 1, job->resource_id); - dbuQuerySetParamInt64(q, 1, job->resource_id); - dbuQuerySetParamInt64(q, 1, job->type); - dbuQuerySetParamBytes(q, 3, job->content.ptr, job->content.length); + dbuQuerySetParamInt64(q, 2, job->resource_id); + dbuQuerySetParamInt64(q, 3, job->type); + dbuQuerySetParamBytes(q, 4, job->content.ptr, job->content.length); if(dbuQueryExec(q)) { job->error = 3; } else {