Improve handling of returning patrons

This commit is contained in:
Alex Cabal 2022-06-29 18:05:49 -05:00
parent dbefba6b94
commit 32206f3cd7
10 changed files with 61 additions and 55 deletions

View file

@ -25,7 +25,7 @@ class Poll extends PropertiesBase{
protected function GetVoteCount(): int{
if($this->VoteCount === null){
$this->VoteCount = (Db::Query('select count(*) as VoteCount from Votes v inner join PollItems pi on v.PollItemId = pi.PollItemId where pi.PollId = ?', [$this->PollId]))[0]->VoteCount;
$this->VoteCount = Db::QueryInt('select count(*) from Votes v inner join PollItems pi on v.PollItemId = pi.PollItemId where pi.PollId = ?', [$this->PollId]);
}
return $this->VoteCount;