src/SQLRequest/SQLSelectRequest.php
public function where($condition, $equality = null, $value = null) {
		if( $equality !== null ) {
			if( $value === null ) {
				$value = $equality;
				$equality = is_array($value) ? 'IN' : '=';
			}
			$condition = $this->escapeIdentifier($condition) . ' ' . $equality . ' ' . (is_array($value) ?
					'(' . $this->sqlAdapter->formatValueList($value) . ')' :
					$this->escapeValue(is_object($value) ? id($value) : $value));
		}
		$where = $this->get('where', array());
		$where[] = $condition;
		return $this->sget('where', $where);
	}
public function where($condition, $equality = null, $value = null) {
		if( $equality !== null ) {
			if( $value === null ) {
				$value = $equality;
				$equality = is_array($value) ? 'IN' : '=';
			}
			$condition = $this->escapeIdentifier($condition) . ' ' . $equality . ' ' . (is_array($value) ?
					'(' . $this->sqlAdapter->formatValueList($value) . ')' :
					$this->escapeValue(is_object($value) ? id($value) : $value));
		}
		$where = $this->get('where', array());
		$where[] = $condition;
		return $this->sget('where', $where);
	}
public function where ( $ condition , $ equality = null , $ value = null ) { if ( $ equality !== null ) { if ( $ value === null ) { $ value = $ equality ; $ equality = is_array ( $ value ) ? 'IN' : '=' ; } $ condition = $ this -> escapeIdentifier ( $ condition ) . ' ' . $ equality . ' ' . ( is_array ( $ value ) ? '(' . $ this -> sqlAdapter -> formatValueList ( $ value ) . ')' : $ this -> escapeValue ( is_object ( $ value ) ? id ( $ value ) : $ value ) ) ; } $ where = $ this -> get ( 'where' , array ( ) ) ; $ where [ ] = $ condition ; return $ this -> sget ( 'where' , $ where ) ; }
Set the whereclause

@param string $condition
@param string $equality
@param string $value
@return \Orpheus\SQLRequest\SQLSelectRequest

If only $condition is provided, this is used as complete string, e.g where("id = 5")
If $equality & $value are provided, it uses it with $condition as a field (identifier), e.g where('id', '=', '5')
where identifier and value are escaped with escapeIdentifier() & escapeValue()
If $equality is provided but $value is not, $equality is the value and where are using a smart comparator, e.g where('id', '5')
All examples return the same results. Smart comparator is IN for array values and = for all other.
Set the whereclause