Skip to content

Commit

Permalink
fix query
Browse files Browse the repository at this point in the history
  • Loading branch information
koertho committed Mar 18, 2024
1 parent ee122d2 commit 8dfb5d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Util/DatabaseUtil/CreateWhereForSerializedBlobResult.php
Expand Up @@ -26,15 +26,15 @@ public function __construct(
*/
public function createInlineAndWhere(): string
{
return '('.$this->field.' REGEXP ('.implode(") AND ".$this->field.' REGEXP (', $this->getValueList()).'))';
return '('.$this->field.' REGEXP (\''.implode("'\) OR ".$this->field.' REGEXP (\'', $this->getValueList()).'\'))';
}

/**
* Return the where query with OR operation for each value. Values are inlined in the query ('REGEXP (':"3"')' instead of 'REGEXP (?)').
*/
public function createInlineOrWhere(): string
{
return '('.$this->field.' REGEXP ('.implode(") OR ".$this->field.' REGEXP (', $this->getValueList()).'))';
return '('.$this->field.' REGEXP (\''.implode("\') OR ".$this->field.' REGEXP (\'', $this->getValueList()).'\'))';
}

/**
Expand Down

0 comments on commit 8dfb5d5

Please sign in to comment.