Rename Vote object to PollVote

This commit is contained in:
Alex Cabal 2022-07-06 11:36:42 -05:00
parent 8168a125d0
commit 4efc5dcdaf
12 changed files with 41 additions and 30 deletions

View file

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