Skip to content

Commit

Permalink
Changed QueryBuilder where
Browse files Browse the repository at this point in the history
  • Loading branch information
dartcafe committed Dec 22, 2018
1 parent b24446c commit cfa19bc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<name>Polls</name>
<summary>A polls app, similar to doodle/dudle with the possibility to restrict access.</summary>
<description>A polls app, similar to doodle/dudle with the possibility to restrict access (members, certain groups/users, hidden and public).</description>
<version>0.9.4</version>
<version>0.9.5</version>
<licence>agpl</licence>
<author>Vinzenz Rosenkranz</author>
<author>René Gieling</author>
Expand Down
10 changes: 5 additions & 5 deletions lib/Migration/Version0009Date20181125061900.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,11 @@ protected function findOptionId($pollId, $text) {
$queryFind = $this->connection->getQueryBuilder();
$queryFind->select(['id'])
->from('polls_options')
// ->where($queryFind->expr()->eq('poll_id', $pollId))
// ->andWhere($queryFind->expr()->eq('poll_option', $text));
->where('poll_id = \'' . $pollId . '\'')
->andWhere('poll_option_text =\'' . $text . '\'');
->where('poll_id = :pollId')
->andWhere('poll_option_text = :text')
->setParameter('pollId', $pollId)
->setParameter('text', $text);

$resultFind = $queryFind->execute();
$row = $resultFind->fetch();

Expand Down

0 comments on commit cfa19bc

Please sign in to comment.