Attila/Orm.php
private function _prepareWhere()
	{
		$sQuery = '';

		if (is_array($this->_mWhere) && count($this->_mWhere) > 0) {

			$sQuery .= ' WHERE ';

			foreach ($this->_mWhere as $sKey => $sValue) {

				$sQuery .= "".$sKey." = '".str_replace("'", "\'", $sValue)."' && ";
			}

			$sQuery = substr($sQuery, 0, -3);
		}
		else if ($this->_mWhere instanceof Where) {

			$sQuery .= ' WHERE 1 '.$this->_mWhere->get();
		}

		$sQuery = str_replace('1  &&', '', $sQuery);

		return $sQuery;
	}
private function _prepareWhere()
	{
		$sQuery = '';

		if (is_array($this->_mWhere) && count($this->_mWhere) > 0) {

			$sQuery .= ' WHERE ';

			foreach ($this->_mWhere as $sKey => $sValue) {

				$sQuery .= "".$sKey." = '".str_replace("'", "\'", $sValue)."' && ";
			}

			$sQuery = substr($sQuery, 0, -3);
		}
		else if ($this->_mWhere instanceof Where) {

			$sQuery .= ' WHERE 1 '.$this->_mWhere->get();
		}

		$sQuery = str_replace('1  &&', '', $sQuery);

		return $sQuery;
	}
private function _prepareWhere ( ) { $ sQuery = '' ; if ( is_array ( $ this -> _mWhere ) && count ( $ this -> _mWhere ) > 0 ) { $ sQuery .= ' WHERE ' ; foreach ( $ this -> _mWhere as $ sKey => $ sValue ) { $ sQuery .= "" . $ sKey . " = '" . str_replace ( "'" , "\'" , $ sValue ) . "' && " ; } $ sQuery = substr ( $ sQuery , 0 , - 3 ) ; } else if ( $ this -> _mWhere instanceof Where ) { $ sQuery .= ' WHERE 1 ' . $ this -> _mWhere -> get ( ) ; } $ sQuery = str_replace ( '1  &&' , '' , $ sQuery ) ; return $ sQuery ; }
prepare the where

@access private
@return string
prepare the where