diff options
author | Kim Alvefur <zash@zash.se> | 2014-04-10 13:16:54 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2014-04-10 13:16:54 +0200 |
commit | a415748985aa2ec998caabb5baf1d7f083d6076a (patch) | |
tree | 521b9634144ac84ea608dbe47a15a0bcd1951695 /plugins/mod_storage_sql2.lua | |
parent | eae27a73d7439930ebe9732d72b14c795b17c528 (diff) | |
parent | b9751f2455a3a7a72c2505d3fc8296ee722726cc (diff) | |
download | prosody-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.lua | 2 |
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]; |