Convert correspondent page queries from SQLite to MySQL

This commit is contained in:
Roan Horning 2022-10-21 19:46:31 -04:00
parent aad77f3c78
commit e1b0189275
Signed by untrusted user: rho_n
GPG Key ID: 234AEF20B72D5769

View File

@ -5,7 +5,8 @@
<!--% query_hpr_show_count = DBI.prepare('
SELECT id
FROM eps
WHERE eps.hostid = ? ')
WHERE eps.hostid = ?
')
%-->
<!--% query_hpr_shows = DBI.prepare('
SELECT
@ -21,8 +22,9 @@
FROM eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
WHERE hosts.hostid = ? AND eps.date < date(\'now\', \'+1 days\')
ORDER BY eps.id + 0 DESC ')
WHERE hosts.hostid = ? AND eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
ORDER BY eps.id DESC
')
%-->
<!--% hpr_shows_to_count = query_hpr_show_count.execute(id); %-->
<!--% hpr_shows = query_hpr_shows.execute(id); %-->
@ -33,8 +35,9 @@
<!--% query_twat_show_count = DBI.prepare('
SELECT id
FROM twat_eps AS \'eps\'
WHERE eps.hostid = ? ')
FROM twat_eps AS eps
WHERE eps.hostid = ?
')
%-->
<!--% query_twat_shows = DBI.prepare('
SELECT
@ -51,7 +54,7 @@
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
WHERE hosts.hostid = ?
ORDER BY eps.id + 0 DESC
ORDER BY eps.id DESC
')
%-->
<!--% twat_shows_to_count = query_twat_show_count.execute(id); %-->