getCurrentValuesAsHash

(since Version 0.1.3-alpha05)
getCurrentValuesAsHash -- Returns the Values of the current Row as hash array.

Description:

array getCurrentValuesAsHash ()

Returns the Values of the current Row as hash array. The values in the Array have the same order as in
the SQL Query you supply.
The current Row (position) can be changed with the functions next(), prev() or setPos().

Because its a hash array, you can access the array with the column names:

$db=new Database("MyDatabase");

$rs=$db->executeQuery("SELECT nr, name, address, email FROM person");
while($rs->next()) {
	$arr=$rs->getCurrentValuesAsHash();
	echo $arr['name'] . " " . $arr['address'] . "<br>";
}

Return Value:

The Values of the current Row as hash array.