public function GetSQL($criteria)
	{
		// start building the sql statement
		$sql = "select " . $this->GetColumnNames() . "";

		$sql .= $this->GetTableJoinSQL($criteria);		

		$sql .= $criteria->GetJoin();
				
		$sql .= $this->GetWhereSQL($criteria);
		
		$sql .= $criteria->GetOrder();
		
		$criteria->Reset();
		
		return $sql;
	}
public function GetSQL($criteria)
	{
		// start building the sql statement
		$sql = "select " . $this->GetColumnNames() . "";

		$sql .= $this->GetTableJoinSQL($criteria);		

		$sql .= $criteria->GetJoin();
				
		$sql .= $this->GetWhereSQL($criteria);
		
		$sql .= $criteria->GetOrder();
		
		$criteria->Reset();
		
		return $sql;
	}
public function GetSQL ( $ criteria ) { // start building the sql statement
 $ sql = "select " . $ this -> GetColumnNames ( ) . "" ; $ sql .= $ this -> GetTableJoinSQL ( $ criteria ) ; $ sql .= $ criteria -> GetJoin ( ) ; $ sql .= $ this -> GetWhereSQL ( $ criteria ) ; $ sql .= $ criteria -> GetOrder ( ) ; $ criteria -> Reset ( ) ; return $ sql ; }
Builds a SQL statement from the given criteria object and resets the Criteria

@param Criteria $criteria
@return string fully formed SQL statement
Builds a SQL statement from the given criteria object and resets the Criteria