Software /
code /
prosody
Diff
plugins/mod_storage_sql2.lua @ 5995:aa7534a877fe
mod_storage_sql2: Fix another SQL syntax error that slipped trough
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 21 Jan 2014 00:51:31 +0100 |
parent | 5985:98ed9fe368ac |
child | 5996:e7efa9703a3f |
line wrap: on
line diff
--- a/plugins/mod_storage_sql2.lua Sat Jan 18 18:46:12 2014 +0000 +++ b/plugins/mod_storage_sql2.lua Tue Jan 21 00:51:31 2014 +0100 @@ -224,7 +224,7 @@ 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);