src/model/Base/ReferenceQuery.php
public function filterByYear($year = null, $comparison = null)
    {
        if (is_array($year)) {
            $useMinMax = false;
            if (isset($year['min'])) {
                $this->addUsingAlias(ReferenceTableMap::COL_YEAR, $year['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($year['max'])) {
                $this->addUsingAlias(ReferenceTableMap::COL_YEAR, $year['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(ReferenceTableMap::COL_YEAR, $year, $comparison);
    }
public function filterByYear($year = null, $comparison = null)
    {
        if (is_array($year)) {
            $useMinMax = false;
            if (isset($year['min'])) {
                $this->addUsingAlias(ReferenceTableMap::COL_YEAR, $year['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($year['max'])) {
                $this->addUsingAlias(ReferenceTableMap::COL_YEAR, $year['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(ReferenceTableMap::COL_YEAR, $year, $comparison);
    }
public function filterByYear ( $ year = null , $ comparison = null ) { if ( is_array ( $ year ) ) { $ useMinMax = false ; if ( isset ( $ year [ 'min' ] ) ) { $ this -> addUsingAlias ( ReferenceTableMap :: COL_YEAR , $ year [ 'min' ] , Criteria :: GREATER_EQUAL ) ; $ useMinMax = true ; } if ( isset ( $ year [ 'max' ] ) ) { $ this -> addUsingAlias ( ReferenceTableMap :: COL_YEAR , $ year [ 'max' ] , Criteria :: LESS_EQUAL ) ; $ useMinMax = true ; } if ( $ useMinMax ) { return $ this ; } if ( null === $ comparison ) { $ comparison = Criteria :: IN ; } } return $ this -> addUsingAlias ( ReferenceTableMap :: COL_YEAR , $ year , $ comparison ) ; }
Filter the query on the year column

Example usage:
<code>
$query->filterByYear(1234); // WHERE year = 1234
$query->filterByYear(array(12, 34)); // WHERE year IN (12, 34)
$query->filterByYear(array('min' => 12)); // WHERE year > 12
</code>

@param     mixed $year The value to use as filter.
Use scalar values for equality.
Use array values for in_array() equivalent.
Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
@param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL

@return $this|ChildReferenceQuery The current query, for fluid interface
Filter the query on the year column