Fix db query for latest episodes on the index page
This commit is contained in:
parent
3f5455a19a
commit
e9911f99f9
@ -19,14 +19,22 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<h1>latest shows</h1>
|
<h1>latest shows</h1>
|
||||||
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
||||||
<!--% FOREACH latest_episodes IN DBI.query('SELECT Episodes.*, Correspondents.id AS [host_id], Correspondents.handle, Correspondents.email, Correspondents.avatar FROM Episodes INNER JOIN Contributors ON Episodes.correspondent_id = Correspondents._id WHERE date(now) > date_posted AND date_posted > date(now, '-7 day') ORDER BY date_posted DESC') %-->
|
<!--% FOREACH latest_episodes IN DBI.query('
|
||||||
|
SELECT Episodes.id, CASE Episodes.is_explicit WHEN 1 THEN \'Explicit\' ELSE \'Clean\' END AS is_explicit ,
|
||||||
|
Episodes.published, Episodes.license, Episodes.title, Episodes.summary, Episodes.series, Episodes.show_notes,
|
||||||
|
Contributors.id AS [host_id], Contributors.handle, Contributors.email, Contributors.avatar
|
||||||
|
FROM Episodes INNER JOIN Contributors ON Episodes.correspondent_id = Contributors.id
|
||||||
|
WHERE Episodes.published BETWEEN date(\'now\', \'-7 days\') AND date(\'now\')
|
||||||
|
ORDER BY published DESC
|
||||||
|
')
|
||||||
|
%-->
|
||||||
<hr>
|
<hr>
|
||||||
<article>
|
<article>
|
||||||
<header>
|
<header>
|
||||||
<!--% %-->
|
<!--% %-->
|
||||||
<h1><a href="episodes/hpr<!--% latest_episodes.id %-->.html">hpr<!--% latest_episodes.id %--> :: <!--% latest_episodes.title %--></a></h1>
|
<h1><a href="episodes/hpr<!--% latest_episodes.id %-->.html">hpr<!--% latest_episodes.id %--> :: <!--% latest_episodes.title %--></a></h1>
|
||||||
<h3><!--% latest_episodes.description%--></h3>
|
<h3><!--% latest_episodes.description%--></h3>
|
||||||
<p class="meta"$>hosted by <a href="correspondents.php?hostid=401">mechatroniac</a> on 2022-06-29 is flagged as clean and released under a cc-by-sa license. <br>
|
<p class="meta"$>hosted by <a href="correspondents/host<!--% latest_episodes.host_id %-->.html"><!--% latest_episodes.handle %--></a> on <!--% latest_episodes.published %--> is flagged as <!--% latest_episodes.is_explicit %--> and released under a <!--% latest_episodes.license %--> license. <br>
|
||||||
<strong>tags:</strong> <em>computer,mobile,bms,power</em>.<br>
|
<strong>tags:</strong> <em>computer,mobile,bms,power</em>.<br>
|
||||||
<small>listen in <a href="local/hpr3628.ogg">ogg</a>, <a href="local/hpr3628.spx">spx</a>, or <a href="local/hpr3628.mp3">mp3</a> format.
|
<small>listen in <a href="local/hpr3628.ogg">ogg</a>, <a href="local/hpr3628.spx">spx</a>, or <a href="local/hpr3628.mp3">mp3</a> format.
|
||||||
<a href="eps.php?id=3628#comments">comments (0)</a></small>
|
<a href="eps.php?id=3628#comments">comments (0)</a></small>
|
||||||
|
Reference in New Issue
Block a user