- my $threads = $DBH->prepare(q{SELECT ft.ftid AS id,ft.subject,count(NULLIF(COALESCE(fp.time > ftv.time,TRUE),FALSE)) AS unread,count(fp.fpid) AS posts, date_trunc('seconds',max(fp.time)::timestamp) as last_post, ft.sticky
+ my $threads = $DBH->prepare(q{SELECT ft.ftid AS id,ft.subject,
+ count(NULLIF(COALESCE(fp.time > ftv.time,TRUE),FALSE)) AS unread,count(fp.fpid) AS posts,
+ date_trunc('seconds',max(fp.time)::timestamp) as last_post,
+ min(fp.time)::date as posting_date, ft.sticky