Skip to content

Commit

Permalink
Merge pull request #458 from nextcloud/fix-queryFind
Browse files Browse the repository at this point in the history
Changed QueryBuilder where
  • Loading branch information
dartcafe authored Dec 22, 2018
2 parents b24446c + cfa19bc commit 3c4f568
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 3c4f568

Please sign in to comment.