ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilLikeMediaCastSearch Class Reference

Class ilLikeMediaCastSearch. More...

+ Inheritance diagram for ilLikeMediaCastSearch:
+ Collaboration diagram for ilLikeMediaCastSearch:

Public Member Functions

 __createWhereCondition ()
 
- Public Member Functions inherited from ilMediaCastSearch
 performSearch ()
 
- Public Member Functions inherited from ilAbstractSearch
 __construct ($qp_obj)
 Constructor public. More...
 
 setFields ($a_fields)
 Set fields to search. More...
 
 getFields ()
 Get fields to search. More...
 
 setFilter ($a_filter)
 set object type to search in More...
 
 setIdFilter ($a_id_filter)
 Set id filter Filters search by given object id. More...
 
 getIdFilter ()
 Get Id filter. More...
 
 appendToFilter ($a_type)
 Append object type to filter. More...
 
 getFilter ()
 get object type to search in More...
 
 __createLocateString ()
 build locate string in case of AND search More...
 
 __prepareFound (&$row)
 
 performSearch ()
 

Additional Inherited Members

- Data Fields inherited from ilAbstractSearch
 $db = null
 
 $query_parser = null
 
 $search_result = null
 
 $object_types
 

Detailed Description

Class ilLikeMediaCastSearch.

Performs Mysql Like search

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 36 of file class.ilLikeMediaCastSearch.php.

Member Function Documentation

◆ __createWhereCondition()

ilLikeMediaCastSearch::__createWhereCondition ( )

Definition at line 38 of file class.ilLikeMediaCastSearch.php.

References $counter, and $ilDB.

39  {
40  global $ilDB;
41 
42  /*
43  $concat = " CONCAT(";
44  $concat .= 'title,content';
45  $concat .= ") ";
46  */
47 
48  /*
49  $concat = $ilDB->concat(
50  array(
51  'title' => 'text',
52  'content' => 'clob'));
53  */
54 
55  $and = " WHERE context_obj_type='mcst' AND ( ";
56  $counter = 0;
57  foreach ($this->query_parser->getQuotedWords() as $word) {
58  if ($counter++) {
59  $and .= " OR ";
60  }
61  #$and .= $concat;
62  #$and .= ("LIKE ('%".$word."%')");
63  $and .= $ilDB->like('title', 'text', '%' . $word . '%');
64  $and .= ' OR ';
65  $and .= $ilDB->like('content', 'clob', '%' . $word . '%');
66  }
67  return $and . ") ";
68  }
$counter
global $ilDB

The documentation for this class was generated from the following file: