ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilLikeExerciseSearch Class Reference
+ Inheritance diagram for ilLikeExerciseSearch:
+ Collaboration diagram for ilLikeExerciseSearch:

Public Member Functions

 __createWhereCondition ()
 
- Public Member Functions inherited from ilExerciseSearch
 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

Definition at line 37 of file class.ilLikeExerciseSearch.php.

Member Function Documentation

◆ __createWhereCondition()

ilLikeExerciseSearch::__createWhereCondition ( )

Definition at line 39 of file class.ilLikeExerciseSearch.php.

References $counter, $ilDB, and array.

40  {
41  global $ilDB;
42 
43  $concat = $ilDB->concat(
44  array(
45  array('title','text'),
46  array('instruction','text'))
47  );
48 
49  $and = " WHERE ( ";
50  $counter = 0;
51  foreach ($this->query_parser->getQuotedWords() as $word) {
52  if ($counter++) {
53  $and .= " OR ";
54  }
55  $and .= $ilDB->like($concat, 'clob', '%' . $word . '%', false);
56  }
57  return $and . ") ";
58  }
$counter
Create styles array
The data for the language used.
global $ilDB

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