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