aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_storage_sql2.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-01-21 00:51:31 +0100
committerKim Alvefur <zash@zash.se>2014-01-21 00:51:31 +0100
commit44a3a3384c32cf8414ee860932774592a91d0019 (patch)
tree23f18163409fc46fcc1b7fb45c057d94d352d40c /plugins/mod_storage_sql2.lua
parent2420d2098c552c3224f6d9a5259abc0ee9042807 (diff)
downloadprosody-44a3a3384c32cf8414ee860932774592a91d0019.tar.gz
prosody-44a3a3384c32cf8414ee860932774592a91d0019.zip
mod_storage_sql2: Fix another SQL syntax error that slipped trough
Diffstat (limited to 'plugins/mod_storage_sql2.lua')
-rw-r--r--plugins/mod_storage_sql2.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/mod_storage_sql2.lua b/plugins/mod_storage_sql2.lua
index b9e9d3ca..e02ad681 100644
--- a/plugins/mod_storage_sql2.lua
+++ b/plugins/mod_storage_sql2.lua
@@ -224,7 +224,7 @@ function archive_store:append(username, key, when, with, value)
return engine:transaction(function()
local key = key or uuid.generate();
local t, value = serialize(value);
- engine:delete("DELETE FROM `prosodyarchive` WHERE `host`=? AND `user`=? AND `store`=? AND KEY=?", host, user or "", store, key);
+ engine:delete("DELETE FROM `prosodyarchive` WHERE `host`=? AND `user`=? AND `store`=? AND `key`=?", host, user or "", store, key);
engine:insert("INSERT INTO `prosodyarchive` (`host`, `user`, `store`, `when`, `with`, `key`, `type`, `value`) VALUES (?,?,?,?,?,?,?,?)", host, user or "", store, when, with, key, t, value);
return key;
end);