prova così..

function Query($query) {
$this->result = mysql_query($query);
while($row = mysql_fetch_array($this->result)) {
print $row["id"];
}
}