hpr_generator/templates/queries-series-mysql.tpl.html

16 lines
514 B
HTML
Raw Normal View History

<!--% query_episodes = 'SELECT miniseries.id, miniseries.name, miniseries.description,
miniseries.private, miniseries.image, miniseries.valid,
ep.number_of_episodes, ep.latest_show, ep.earliest_show
FROM miniseries
INNER JOIN
(SELECT series,
COUNT(eps.id) AS number_of_episodes,
MAX(eps.date) AS latest_show,
MIN(eps.date) AS earliest_show
FROM eps
WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
GROUP BY series) AS ep ON ep.series = miniseries.id
ORDER BY name'
%-->