WIKINDX METHODS

Method:
loopRecordSet()

Class:
SQL

Method Call:
include_once("core/sql/SQL.php");
$db = new SQL();
ASSOC_ARRAY $db->loopRecordSet(ADODB_RECORDSET: $recordset);

Description:
Returns an associative array of SQL field names => field values or FALSE if there are no more rows in the recordset. Designed to be used in a while() loop.

Usage:

For example (assuming the database object exists within a class as $this->db):

	$recordset = $this->db->select(array('WKX_resource_creator'), array("surname", "firstname"));
	while($row = $this->db->loopRecordSet($recordset))
		print $row['surname'] . ", " . $row['firstname'] . "<br />";

WIKINDX home      WIKINDX usage      WIKINDX classes