Update SQL query to order results by id

This commit is contained in:
Roan Horning 2022-09-21 21:18:48 -04:00
parent 1c9eb16934
commit 991b3dcec1
Signed by untrusted user: rho_n
GPG Key ID: 234AEF20B72D5769
4 changed files with 7 additions and 7 deletions

View File

@ -22,7 +22,7 @@
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 date DESC ')
ORDER BY eps.id + 0 DESC ')
%-->
<!--% hpr_shows_to_count = query_hpr_show_count.execute(id); %-->
<!--% hpr_shows = query_hpr_shows.execute(id); %-->
@ -51,7 +51,7 @@
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
WHERE hosts.hostid = ?
ORDER BY date DESC
ORDER BY eps.id + 0 DESC
')
%-->
<!--% twat_shows_to_count = query_twat_show_count.execute(id); %-->

View File

@ -20,7 +20,7 @@
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
WHERE eps.date < date(\'now\', \'+1 days\')
ORDER BY date DESC
ORDER BY eps.id + 0 DESC
')
%-->
<!--% show_summary(episodes) %-->
@ -42,7 +42,7 @@
FROM twat_eps as eps
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
ORDER BY date DESC
ORDER BY eps.id + 0 DESC
')
%-->
<!--% twat_show_summary(twat_episode) %-->

View File

@ -65,7 +65,7 @@
INNER JOIN miniseries ON eps.series = miniseries.id
LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id
WHERE eps.date < date(\'now\', \'+1 days\')
ORDER BY date DESC
ORDER BY eps.id + 0 DESC
LIMIT 10
')
%-->
@ -106,7 +106,7 @@
INNER JOIN hosts ON eps.hostid = hosts.hostid
INNER JOIN miniseries ON eps.series = miniseries.id
WHERE eps.date < date(\'now\', \'+1 days\')
ORDER BY date DESC
ORDER BY eps.id + 0 DESC
LIMIT 30 OFFSET 10
')
%-->

View File

@ -38,7 +38,7 @@
INNER JOIN hosts
ON eps.hostid = hosts.hostid
WHERE series = ?
ORDER BY date DESC
ORDER BY eps.id + 0 DESC
')
%-->
<!--% show_results = query_shows.execute(id) %-->