From bf5b92d41738f8df56cb5ce77b2c41b005d3058b Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 4 May 2018 13:15:56 +0800 Subject: [PATCH] src/strip.vala --- src/strip.vala | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/strip.vala b/src/strip.vala index df3d702..6c2a755 100644 --- a/src/strip.vala +++ b/src/strip.vala @@ -415,17 +415,12 @@ public class Strip : GLib.Object { this.query(""" SELECT - id, - DATE_FORMAT(created,"%%Y/%%m/%%d") as create_date, - msgid - FROM - Attachment - WHERE - checksum = '%s' - AND - filesize = %d - LIMIT - 1 + + attachment_init( + '%s', -- in_msgid VARCHAR(32), + '%s', -- in_checksum VARCHAR(64), + '%s' -- in_mime_filename varchar(255) + ) as id ; """.printf( chksum, file_size) ); var file_id = "0"; -- 2.39.2