forked from rho_n/hpr_generator
Convert correspondent page queries from SQLite to MySQL
This commit is contained in:
parent
aad77f3c78
commit
e1b0189275
@ -5,7 +5,8 @@
|
|||||||
<!--% query_hpr_show_count = DBI.prepare('
|
<!--% query_hpr_show_count = DBI.prepare('
|
||||||
SELECT id
|
SELECT id
|
||||||
FROM eps
|
FROM eps
|
||||||
WHERE eps.hostid = ? ')
|
WHERE eps.hostid = ?
|
||||||
|
')
|
||||||
%-->
|
%-->
|
||||||
<!--% query_hpr_shows = DBI.prepare('
|
<!--% query_hpr_shows = DBI.prepare('
|
||||||
SELECT
|
SELECT
|
||||||
@ -21,8 +22,9 @@
|
|||||||
FROM eps
|
FROM eps
|
||||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||||
WHERE hosts.hostid = ? AND eps.date < date(\'now\', \'+1 days\')
|
WHERE hosts.hostid = ? AND eps.date < DATE_ADD(NOW(), INTERVAL 1 DAY)
|
||||||
ORDER BY eps.id + 0 DESC ')
|
ORDER BY eps.id DESC
|
||||||
|
')
|
||||||
%-->
|
%-->
|
||||||
<!--% hpr_shows_to_count = query_hpr_show_count.execute(id); %-->
|
<!--% hpr_shows_to_count = query_hpr_show_count.execute(id); %-->
|
||||||
<!--% hpr_shows = query_hpr_shows.execute(id); %-->
|
<!--% hpr_shows = query_hpr_shows.execute(id); %-->
|
||||||
@ -33,8 +35,9 @@
|
|||||||
|
|
||||||
<!--% query_twat_show_count = DBI.prepare('
|
<!--% query_twat_show_count = DBI.prepare('
|
||||||
SELECT id
|
SELECT id
|
||||||
FROM twat_eps AS \'eps\'
|
FROM twat_eps AS eps
|
||||||
WHERE eps.hostid = ? ')
|
WHERE eps.hostid = ?
|
||||||
|
')
|
||||||
%-->
|
%-->
|
||||||
<!--% query_twat_shows = DBI.prepare('
|
<!--% query_twat_shows = DBI.prepare('
|
||||||
SELECT
|
SELECT
|
||||||
@ -51,7 +54,7 @@
|
|||||||
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
INNER JOIN hosts ON eps.hostid = hosts.hostid
|
||||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||||
WHERE hosts.hostid = ?
|
WHERE hosts.hostid = ?
|
||||||
ORDER BY eps.id + 0 DESC
|
ORDER BY eps.id DESC
|
||||||
')
|
')
|
||||||
%-->
|
%-->
|
||||||
<!--% twat_shows_to_count = query_twat_show_count.execute(id); %-->
|
<!--% twat_shows_to_count = query_twat_show_count.execute(id); %-->
|
||||||
|
Loading…
Reference in New Issue
Block a user