// initialize it with known data..
// that should wipe out dupes.
- var matches = this.execute("SELECT count(id) as nid FROM Attachment WHERE id = %d".printf(
+ var matches = this.execute("SELECT id FROM Attachment WHERE id = %d".printf(
int.parse(sid)));
- this.query("""
+ this.execute("""
INSERT INTO Attachment (
%d, -- size
'%s', -- checkum
- '%s' --created:
- )"
+ '%s' -- created:
+ )
""".printf(
this.mysql_escape(filename),
this.mysql_escape(mime_type),
this.mysql_escape(file_path),
- file_size
- file_size
+ file_size,
+ file_size,
this.mysql_escape(chksum),
this.created_date
));
'%s' -- in_mailfort_sig varchar(64)
)
""".printf(
- id,
- "", // this will be ignored..
+ id,
this.created_date,
this.mysql_escape(this.active_message_x_mailfort_sig)
{
return this.real_query(false, str);
}
- public string real_query(bool need_return, string str)
+ /**
+ * need_return
+ 0 = no
+ 1 = yes
+ -1 = don't try.
+ */
+ public string real_query(int need_return, string str)
{
GLib.debug("Before Query : %u : %s\n", this.mysql.errno(), this.mysql.error());