- WHERE PollId = '.$object->GetID().' AND CreatedById = '.$this->Application->RecallVar('user_id').' AND UserIP = '.$this->Conn->qstr(getenv('REMOTE_ADDR'));
+ FROM ' . TABLE_PREFIX . 'PollsStatistics
+ WHERE (' . implode(') AND (', $where_clause) . ')';
+
return $this->Conn->GetOne($sql) > 0;
}
return false;
}
/**
* Allows to tell if user from current ip has voted already for current poll