$subsql = "SELECT count(*) FROM comments WHERE page=i.page||'/'||i.id";
$cols = "*, ($subsql AND message IS NOT NULL) AS replycount";
$subsql = "SELECT count(*) FROM comments WHERE page=i.page||'/'||i.id";
$cols = "*, ($subsql AND message IS NOT NULL) AS replycount";