コード例 #1
0
 /**
  * will set the match-against cluase depending on the input_filter->categories
  * 
  * If emtpy, will return the valid "1=1" query element so the queries will stay correct
  *
  * @param reportsInputFilter $input_filter
  */
 private static function setCategoriesMatchClause(reportsInputFilter $input_filter)
 {
     $categories_ids_str = null;
     if ($input_filter->categories) {
         $categories_ids_str = entryFilter::categoryNamesToIndexedIds($input_filter->categories);
         if ($categories_ids_str) {
             $categories_match = " MATCH (search_text_discrete) AGAINST ( '{$categories_ids_str}' IN BOOLEAN MODE ) ";
             return $categories_match;
         }
     }
     return "1=1";
 }