aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_storage_sql2.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2014-04-10 13:16:54 +0200
committerKim Alvefur <zash@zash.se>2014-04-10 13:16:54 +0200
commita415748985aa2ec998caabb5baf1d7f083d6076a (patch)
tree521b9634144ac84ea608dbe47a15a0bcd1951695 /plugins/mod_storage_sql2.lua
parenteae27a73d7439930ebe9732d72b14c795b17c528 (diff)
parentb9751f2455a3a7a72c2505d3fc8296ee722726cc (diff)
downloadprosody-a415748985aa2ec998caabb5baf1d7f083d6076a.tar.gz
prosody-a415748985aa2ec998caabb5baf1d7f083d6076a.zip
Merge 0.10->trunk
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 7a2ec4a7..7414e5ed 100644
--- a/plugins/mod_storage_sql2.lua
+++ b/plugins/mod_storage_sql2.lua
@@ -289,7 +289,7 @@ function archive_store:find(username, query)
-- Total matching
if query.total then
- local stats = engine:select(sql_query:gsub("^(SELECT).-(FROM)", "%1 COUNT(*) %2"):format(t_concat(where, " AND "), "DESC", ""), unpack(args));
+ local stats = engine:select("SELECT COUNT(*) FROM `prosodyarchive` WHERE " .. t_concat(where, " AND "), unpack(args));
if stats then
local _total = stats()
total = _total and _total[1];