Use static class names instead of strings when getting objects from the DB

This commit is contained in:
Alex Cabal 2024-05-13 13:44:04 -05:00
parent a442f92e28
commit acb6b2949f
16 changed files with 36 additions and 34 deletions

View file

@ -4,7 +4,7 @@ $pastPolls = Db::Query('
from Polls
where utc_timestamp() >= end
order by Start desc
', [], 'Poll');
', [], Poll::class);
$openPolls = Db::Query('
SELECT *
@ -15,7 +15,7 @@ $openPolls = Db::Query('
(Start is null
or Start <= utc_timestamp())
order by Start desc
', [], 'Poll');
', [], Poll::class);
?><?= Template::Header(['title' => 'Polls', 'highlight' => '', 'description' => 'The various polls active at Standard Ebooks.']) ?>
<main>