Beispiel #1
0
 /**
  * @param KDatabaseQuery $query
  */
 protected function _buildQueryWhere(KDatabaseQuery $query)
 {
     parent::_buildQueryWhere($query);
     $state = $this->_state;
     //TODO: Filter on array;
     if ($state->type) {
         $query->where('tbl.type', '=', $state->type);
     }
     if (is_numeric($state->featured)) {
         $query->where('tbl.featured', '=', $state->featured);
     }
     if (!$state->isUnique()) {
         $query->where('tbl.enabled', '=', 1);
     }
 }
Beispiel #2
0
 /**
  * @param KDatabaseQuery $query
  */
 protected function _buildQueryWhere(KDatabaseQuery $query)
 {
     parent::_buildQueryWhere($query);
     $state = $this->_state;
     //TODO: Filter on array;
     if ($state->type) {
         $query->where('tbl.type', '=', $state->type);
     }
     if (is_numeric($state->enabled)) {
         $query->where('tbl.enabled', '=', $state->enabled);
     }
     if (is_numeric($state->featured)) {
         $query->where('tbl.featured', '=', $state->featured);
     }
     if ($state->search) {
         $query->where('tbl.title', 'LIKE', '%' . $state->search . '%');
     }
 }