Software /
code /
prosody
Comparison
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 |
comparison
equal
deleted
inserted
replaced
5993:ef11b8bab405 | 5995:aa7534a877fe |
---|---|
222 end | 222 end |
223 local user,store = username,self.store; | 223 local user,store = username,self.store; |
224 return engine:transaction(function() | 224 return engine:transaction(function() |
225 local key = key or uuid.generate(); | 225 local key = key or uuid.generate(); |
226 local t, value = serialize(value); | 226 local t, value = serialize(value); |
227 engine:delete("DELETE FROM `prosodyarchive` WHERE `host`=? AND `user`=? AND `store`=? AND KEY=?", host, user or "", store, key); | 227 engine:delete("DELETE FROM `prosodyarchive` WHERE `host`=? AND `user`=? AND `store`=? AND `key`=?", host, user or "", store, key); |
228 engine:insert("INSERT INTO `prosodyarchive` (`host`, `user`, `store`, `when`, `with`, `key`, `type`, `value`) VALUES (?,?,?,?,?,?,?,?)", host, user or "", store, when, with, key, t, value); | 228 engine:insert("INSERT INTO `prosodyarchive` (`host`, `user`, `store`, `when`, `with`, `key`, `type`, `value`) VALUES (?,?,?,?,?,?,?,?)", host, user or "", store, when, with, key, t, value); |
229 return key; | 229 return key; |
230 end); | 230 end); |
231 end | 231 end |
232 | 232 |