dbFieldTable example

foreach (['type', 'name'] as $field) {
        if (isset($conditions[$field])) {
          $subquery->condition('l.' . $field(array) $conditions[$field], 'IN');
          unset($conditions[$field]);
        }
      }
      $query->condition('s.lid', $subquery, 'IN');
    }

    // Add conditions for both tables.     foreach ($conditions as $field => $value) {
      $table_alias = $this->dbFieldTable($field);
      $field_alias = $table_alias . '.' . $field;
      if (is_null($value)) {
        $query->isNull($field_alias);
      }
      elseif ($table_alias == 't' && $join === 'leftJoin') {
        // Conditions for target fields when doing an outer join only make         // sense if we add also OR field IS NULL.         $query->condition(($this->connection->condition('OR'))
          ->condition($field_alias(array) $value, 'IN')
          ->isNull($field_alias)
        );
      }
Home | Imprint | This part of the site doesn't use cookies.