ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilLikeTestSearch.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
31{
32 public function __createWhereCondition(): string
33 {
34 foreach ($this->getFields() as $field) {
35 $tmp_field[$field] = 'text';
36 }
37
38 $and = " WHERE ";
39 $counter = 0;
40 foreach ($this->query_parser->getQuotedWords() as $word) {
41 foreach ($this->getFields() as $field) {
42 if ($counter++) {
43 $and .= " OR ";
44 }
45 $and .= $this->db->like($field, 'text', '%' . $word . '%');
46 }
47 }
48 return $and;
49 }
50}
$counter