my $threads = $dbh->prepare(q{SELECT ft.ftid,u.username,ft.subject
,count(NULLIF(COALESCE(fp.time > ftv.time,TRUE),FALSE)) AS unread,count(fp.fpid) AS posts
my $threads = $dbh->prepare(q{SELECT ft.ftid,u.username,ft.subject
,count(NULLIF(COALESCE(fp.time > ftv.time,TRUE),FALSE)) AS unread,count(fp.fpid) AS posts