From: Michael Andreen Date: Tue, 9 Jan 2007 19:47:55 +0000 (+0000) Subject: don't do max on ftv.time, since it'll likely be null anyway X-Git-Url: https://ruin.nu/git/?a=commitdiff_plain;ds=sidebyside;h=86fb846b1b46198bd134e83b5c0488b5b8731ec2;p=ndwebbie.git don't do max on ftv.time, since it'll likely be null anyway --- diff --git a/ND/Include.pm b/ND/Include.pm index 447c4f9..81f5a8d 100644 --- a/ND/Include.pm +++ b/ND/Include.pm @@ -19,7 +19,7 @@ package ND::Include; use strict; -use warnings FATAL => 'all'; +use warnings; use CGI qw{:standard}; require Exporter; @@ -53,7 +53,7 @@ sub intel_log { sub unread_query { return $ND::DBH->prepare_cached(q{ - SELECT count(*) AS unread, max(ftv.time) AS last_visit + SELECT count(*) AS unread FROM forum_boards fb NATURAL JOIN forum_threads ft JOIN forum_posts fp USING (ftid) LEFT OUTER JOIN (SELECT * FROM forum_thread_visits WHERE uid = $1) ftv ON ftv.ftid = ft.ftid