[i282] Add to each correspondent's page the number of comments each postcast has #296

Merged
rho_n merged 4 commits from i282_correspondents-page-the-number-of-comments-each-postcast-has into main 2025-11-08 01:02:12 +00:00
2 changed files with 14 additions and 19 deletions
Showing only changes of commit 126e184126 - Show all commits

View File

@@ -3,22 +3,17 @@
<!--% PROCESS 'shared-utils.tpl.html' %-->
<!--% PROCESS "queries-correspondent.tpl.html" %-->
<!--% USE DBI(constants.driver) %-->
<!--% results_hpr_shows = DBI.prepare(query_hpr_shows)
%-->
<!--% results_hpr_shows = DBI.prepare(query_hpr_shows) %-->
<!--% results_hpr_show_count = DBI.prepare(query_hpr_show_count) %-->
<!--% hpr_shows_to_count = results_hpr_show_count.execute(id); %-->
<!--% hpr_result_status = results_hpr_show_count.execute(id); %-->
<!--% hpr_shows = results_hpr_shows.execute(id); %-->
<!--% hpr_show_count = 0 %-->
<!--% FOREACH show IN hpr_shows_to_count %-->
<!--% hpr_show_count = hpr_show_count +1; %-->
<!--% END %-->
<!--% hpr_show_count = results_hpr_show_count.fetchrow_array %-->
<!--% twt_shows_to_count = query_twt_show_count.execute(id); %-->
<!--% twt_shows = query_twt_shows.execute(id); %-->
<!--% twt_show_count = 0 %-->
<!--% FOREACH show IN twt_shows_to_count %-->
<!--% twt_show_count = twt_show_count +1; %-->
<!--% END %-->
<!--% results_hpr_shows = DBI.prepare(query_twt_shows) %-->
<!--% results_twt_show_count = DBI.prepare(query_twt_show_count) %-->
<!--% twt_result_status = results_twt_show_count.execute(id); %-->
<!--% twt_shows = results_hpr_shows.execute(id); %-->
<!--% twt_show_count = results_twt_show_count.fetchrow_array %-->
<!--% hosts = DBI.tie('hosts', 'hostid') %-->

View File

@@ -17,18 +17,18 @@
'
%-->
<!--% query_hpr_show_count = '
SELECT id
SELECT COUNT(id) as Tally
FROM eps
WHERE eps.hostid = ? AND eps.date < date(\'now\', \'+1 days\')
'
%-->
<!--% query_twt_show_count = DBI.prepare('
SELECT id
<!--% query_twt_show_count = '
SELECT COUNT(id) as Tally
FROM twat_eps AS eps
WHERE eps.hostid = ?
')
'
%-->
<!--% query_twt_shows = DBI.prepare('
<!--% query_twt_shows = '
SELECT
eps.id,
CASE eps.explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS explicit ,
@@ -44,6 +44,6 @@
INNER JOIN miniseries ON eps.series = miniseries.id
WHERE hosts.hostid = ?
ORDER BY eps.id DESC
')
'
%-->