mirror of
https://github.com/standardebooks/web.git
synced 2025-07-16 03:16:36 -04:00
Fix ordering of past polls
This commit is contained in:
parent
505352a3ec
commit
39b885033e
1 changed files with 6 additions and 6 deletions
|
@ -3,18 +3,18 @@ $pastPolls = Db::Query('
|
||||||
SELECT *
|
SELECT *
|
||||||
from Polls
|
from Polls
|
||||||
where utc_timestamp() >= end
|
where utc_timestamp() >= end
|
||||||
order by Created desc
|
order by Start desc
|
||||||
', [], 'Poll');
|
', [], 'Poll');
|
||||||
|
|
||||||
$openPolls = Db::Query('
|
$openPolls = Db::Query('
|
||||||
SELECT *
|
SELECT *
|
||||||
from Polls
|
from Polls
|
||||||
where (end is null
|
where (End is null
|
||||||
or utc_timestamp() <= end)
|
or utc_timestamp() <= End)
|
||||||
and
|
and
|
||||||
(start is null
|
(Start is null
|
||||||
or start <= utc_timestamp())
|
or Start <= utc_timestamp())
|
||||||
order by Created desc
|
order by Start desc
|
||||||
', [], 'Poll');
|
', [], 'Poll');
|
||||||
|
|
||||||
?><?= Template::Header(['title' => 'Polls', 'highlight' => '', 'description' => 'The various polls active at Standard Ebooks.']) ?>
|
?><?= Template::Header(['title' => 'Polls', 'highlight' => '', 'description' => 'The various polls active at Standard Ebooks.']) ?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue