public function fetchAll($type=SQLAnywhereClient::FETCH_ASSOC)
	{
		$data = array();
		
		if ($this->result) {
			switch ($type) {
				case 'array':
					while ($row = sasql_fetch_array( $this->result ))
						array_push($data, $row);
				break;

				case 'assoc':
					while ($row = sasql_fetch_assoc( $this->result ))
						array_push($data, $row);
				break;

				case 'row':
					while ($row = sasql_fetch_row( $this->result ))
						array_push($data, $row);
				break;

				case 'field':
					while ($row = sasql_fetch_field( $this->result ))
						array_push($data, $row);
				break;

				case 'object':
					while ($row = sasql_fetch_object( $this->result ))
						array_push($data, $row);			
				break;
				
				default:
					while ($row = sasql_fetch_array( $this->result ))
						array_push($data, $row);
				break;
			}		
		}

		return $data;
	}