Update SQL query to order results by id
This commit is contained in:
parent
1c9eb16934
commit
991b3dcec1
@ -22,7 +22,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 = ? AND eps.date < date(\'now\', \'+1 days\')
|
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_to_count = query_hpr_show_count.execute(id); %-->
|
||||||
<!--% hpr_shows = query_hpr_shows.execute(id); %-->
|
<!--% hpr_shows = query_hpr_shows.execute(id); %-->
|
||||||
@ -51,7 +51,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 date DESC
|
ORDER BY eps.id + 0 DESC
|
||||||
')
|
')
|
||||||
%-->
|
%-->
|
||||||
<!--% twat_shows_to_count = query_twat_show_count.execute(id); %-->
|
<!--% twat_shows_to_count = query_twat_show_count.execute(id); %-->
|
||||||
|
@ -20,7 +20,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 eps.date < date(\'now\', \'+1 days\')
|
WHERE eps.date < date(\'now\', \'+1 days\')
|
||||||
ORDER BY date DESC
|
ORDER BY eps.id + 0 DESC
|
||||||
')
|
')
|
||||||
%-->
|
%-->
|
||||||
<!--% show_summary(episodes) %-->
|
<!--% show_summary(episodes) %-->
|
||||||
@ -42,7 +42,7 @@
|
|||||||
FROM twat_eps as eps
|
FROM twat_eps as 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
|
||||||
ORDER BY date DESC
|
ORDER BY eps.id + 0 DESC
|
||||||
')
|
')
|
||||||
%-->
|
%-->
|
||||||
<!--% twat_show_summary(twat_episode) %-->
|
<!--% twat_show_summary(twat_episode) %-->
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
INNER JOIN miniseries ON eps.series = miniseries.id
|
INNER JOIN miniseries ON eps.series = miniseries.id
|
||||||
LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id
|
LEFT JOIN comment_tallies ON eps.id = comment_tallies.eps_id
|
||||||
WHERE eps.date < date(\'now\', \'+1 days\')
|
WHERE eps.date < date(\'now\', \'+1 days\')
|
||||||
ORDER BY date DESC
|
ORDER BY eps.id + 0 DESC
|
||||||
LIMIT 10
|
LIMIT 10
|
||||||
')
|
')
|
||||||
%-->
|
%-->
|
||||||
@ -106,7 +106,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 eps.date < date(\'now\', \'+1 days\')
|
WHERE eps.date < date(\'now\', \'+1 days\')
|
||||||
ORDER BY date DESC
|
ORDER BY eps.id + 0 DESC
|
||||||
LIMIT 30 OFFSET 10
|
LIMIT 30 OFFSET 10
|
||||||
')
|
')
|
||||||
%-->
|
%-->
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
INNER JOIN hosts
|
INNER JOIN hosts
|
||||||
ON eps.hostid = hosts.hostid
|
ON eps.hostid = hosts.hostid
|
||||||
WHERE series = ?
|
WHERE series = ?
|
||||||
ORDER BY date DESC
|
ORDER BY eps.id + 0 DESC
|
||||||
')
|
')
|
||||||
%-->
|
%-->
|
||||||
<!--% show_results = query_shows.execute(id) %-->
|
<!--% show_results = query_shows.execute(id) %-->
|
||||||
|
Loading…
Reference in New Issue
Block a user