english/libraries/joomla/database/database.php
/**
	 * Method to get an array of the result set rows from the database query where each row is an array.  The array
	 * of objects can optionally be keyed by a field offset, but defaults to a sequential numeric array.
	 *
	 * NOTE: Chosing to key the result array by a non-unique field can result in unwanted
	 * behavior and should be avoided.
	 *
	 * @param   string  $key  The name of a field on which to key the result array.
	 *
	 * @return  mixed   The return value or null if the query failed.
	 *
	 * @since   11.1
	 * @throws  DatabaseException
	 */
Method to get an array of the result set rows from the database query where each row is an array.  The array
of objects can optionally be keyed by a field offset, but defaults to a sequential numeric array.

Chosing to key the result array by a non-unique field can result in unwanted
behavior and should be avoided.

@param   string  $key  The name of a field on which to key the result array.

@return  mixed   The return value or null if the query failed.


Method to get an array of the result set rows from the database query where each row is an array . The array of objects can optionally be keyed by a field offset but defaults to a sequential numeric array . Chosing to key the result array by a non - unique field can result in unwanted behavior and should be avoided . @param string $key The name of a field on which to key the result array . @return mixed The return value or null if the query failed .
public function loadRowList($key=null)
	{
		$array = array();
		if (!($cursor = $this->query())) {
			return null;
		}
		while ($row = $this->fetchArray($cursor))
		{
			if ($key !== null) {
				$array[$row[$key]] = $row;
			}
			else {
				$array[] = $row;
			}
		}
		$this->freeResult($cursor);
		return $array;
	}
public function loadRowList ( $ key = null ) { $ array = array ( ) ; if ( ! ( $ cursor = $ this -> query ( ) ) ) { return null ; } while ( $ row = $ this -> fetchArray ( $ cursor ) ) { if ( $ key !== null ) { $ array [ $ row [ $ key ] ] = $ row ; } else { $ array [ ] = $ row ; } } $ this -> freeResult ( $ cursor ) ; return $ array ; }
Method to get an array of the result set rows from the database query where each row is an array.
Method to get an array of the result set rows from the database query where each row is an array .
// Initialise variables. // Execute the query and get the result set cursor. // Get all of the rows from the result set as arrays. // Free up system resources and return.