ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.ilLikeMediaPoolSearch.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
31{
32 public function __createAndCondition(): string
33 {
34 $concat = $this->db->concat(
35 array(
36 array('title','text')
37 )
38 );
39
40
41 $and = " AND ( ";
42 $counter = 0;
43 foreach ($this->query_parser->getQuotedWords() as $word) {
44 if ($counter++) {
45 $and .= " OR";
46 }
47 #$and .= $concat;
48 #$and .= ("LIKE ('%".$word."%')");
49 #$and .= $ilDB->like($concat,'text','%'.$word.'%');
50 $and .= $this->db->like('title', 'text', '%' . $word . '%');
51 }
52 return $and . ") ";
53 }
54
59 public function __createKeywordAndCondition(): string
60 {
61 $concat = ' keyword ';
62
63 $and = " WHERE ";
64 $counter = 0;
65 foreach ($this->query_parser->getQuotedWords() as $word) {
66 if ($counter++) {
67 $and .= " OR ";
68 }
69 $and .= $this->db->like($concat, 'text', '%' . $word . '%');
70 }
71 return $and;
72 }
73}
__createKeywordAndCondition()
Condition for mob keyword search.
$counter