protected function generateWhere( $column, $param1 = null, $param2 = null, $type = 'and' ) { // @codingStandardsIgnoreLine

		// when param2 is null we replace param2 with param one as the
		// value holder and make param1 to the = operator.
		if ( is_null( $param2 ) ) {
			$param2 = $param1;
			$param1 = '=';
		}

		// When param2 is an array we probably
		// have an "in" or "between" statement which has no need for duplicates.
		if ( is_array( $param2 ) ) {
			$param2 = $this->esc_array( array_unique( $param2 ) );
			if ( in_array( $param1, array( 'between', 'not between' ) ) ) {
				$param2 = join( ' and ', $param2 );
			} else {
				$param2 = '(' . join( ', ', $param2 ) . ')';
			}
		} elseif ( is_scalar( $param2 ) ) {
			$param2 = $this->esc_value( $param2 );
		}

		return join( ' ', array( $type, $column, $param1, $param2 ) );
	}
protected function generateWhere( $column, $param1 = null, $param2 = null, $type = 'and' ) { // @codingStandardsIgnoreLine

		// when param2 is null we replace param2 with param one as the
		// value holder and make param1 to the = operator.
		if ( is_null( $param2 ) ) {
			$param2 = $param1;
			$param1 = '=';
		}

		// When param2 is an array we probably
		// have an "in" or "between" statement which has no need for duplicates.
		if ( is_array( $param2 ) ) {
			$param2 = $this->esc_array( array_unique( $param2 ) );
			if ( in_array( $param1, array( 'between', 'not between' ) ) ) {
				$param2 = join( ' and ', $param2 );
			} else {
				$param2 = '(' . join( ', ', $param2 ) . ')';
			}
		} elseif ( is_scalar( $param2 ) ) {
			$param2 = $this->esc_value( $param2 );
		}

		return join( ' ', array( $type, $column, $param1, $param2 ) );
	}
protected function generateWhere ( $ column , $ param1 = null , $ param2 = null , $ type = 'and' ) { // @codingStandardsIgnoreLine // when param2 is null we replace param2 with param one as the // value holder and make param1 to the = operator. if ( is_null ( $ param2 ) ) { $ param2 = $ param1 ; $ param1 = '=' ; } // When param2 is an array we probably // have an "in" or "between" statement which has no need for duplicates. if ( is_array ( $ param2 ) ) { $ param2 = $ this -> esc_array ( array_unique ( $ param2 ) ) ; if ( in_array ( $ param1 , array ( 'between' , 'not between' ) ) ) { $ param2 = join ( ' and ' , $ param2 ) ; } else { $ param2 = '(' . join ( ', ' , $ param2 ) . ')' ; } } elseif ( is_scalar ( $ param2 ) ) { $ param2 = $ this -> esc_value ( $ param2 ) ; } return join ( ' ' , array ( $ type , $ column , $ param1 , $ param2 ) ) ; }
Generate Where clause

@param string $column The SQL column.
@param mixed  $param1 Operator or value depending if $param2 isset.
@param mixed  $param2 The value if $param1 is an operator.
@param string $type the where type ( and, or ).

@return string
Generate Where clause