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;
	}