Commit 0d9446f2 authored by Simon Welsh's avatar Simon Welsh

Bye bye HAVING

git-svn-id: svn+ssh://lsgn/var/logbot-www@77 5f99df0c-6b0a-442a-b40a-040688e84a9d
parent d3b704fe
......@@ -128,7 +128,7 @@ function build_stats(Redis $r) {
'wtf',
'Penis',
];
$query = 'SELECT COUNT(*) AS "Number", "Nick" FROM "Log" WHERE "Text" ILIKE \'%%%s%%\' GROUP BY "Nick" HAVING COUNT(*) >= 10 ORDER BY "Number" DESC LIMIT 50;';
$query = 'SELECT COUNT(*) AS "Number", "Nick" FROM "Log" WHERE "Text" ILIKE \'%%%s%%\' GROUP BY "Nick" ORDER BY "Number" DESC LIMIT 50;';
foreach($swears as $name) {
$res = DB::inst()->query(sprintf($query, $name));
$stats[$name] = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment