forked from rho_n/hpr_generator
Convert episode page queries from SQLite to MySQL
This commit is contained in:
parent
4af117fb7a
commit
5612eeed42
@ -7,7 +7,7 @@
|
|||||||
WITH episode_maxmin AS (
|
WITH episode_maxmin AS (
|
||||||
SELECT MAX(id) AS \'latest\', MIN(id) AS \'earliest\', ? AS \'id\'
|
SELECT MAX(id) AS \'latest\', MIN(id) AS \'earliest\', ? AS \'id\'
|
||||||
FROM eps
|
FROM eps
|
||||||
WHERE eps.date < date (\'now\', \'+1 days\')
|
WHERE eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
|
||||||
),
|
),
|
||||||
episode_date AS (
|
episode_date AS (
|
||||||
SELECT eps.date
|
SELECT eps.date
|
||||||
@ -26,7 +26,7 @@
|
|||||||
FROM eps
|
FROM eps
|
||||||
INNER JOIN episode_date
|
INNER JOIN episode_date
|
||||||
ON eps.date > episode_date.date
|
ON eps.date > episode_date.date
|
||||||
WHERE eps.date < date (\'now\')
|
WHERE eps.date < NOW()
|
||||||
),
|
),
|
||||||
comment_tallies AS (
|
comment_tallies AS (
|
||||||
SELECT
|
SELECT
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
<!--% USE DBI(constants.driver, constants.user, constants.password) %-->
|
||||||
<!--% FOREACH episode IN DBI.query(
|
<!--% FOREACH episode IN DBI.query(
|
||||||
'select eps.id from eps
|
'select eps.id from eps
|
||||||
where eps.date < date (\'now\', \'+1 days\') '
|
where eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY) '
|
||||||
) %-->
|
) %-->
|
||||||
,<!--% episode.id %-->
|
,<!--% episode.id %-->
|
||||||
<!--% END %-->
|
<!--% END %-->
|
||||||
|
Loading…
Reference in New Issue
Block a user