database_wrapper.php
/**
	 *
	 * execute an SQL query and return the results in a two-dimensional array.
	 * @param unknown_type $query_result The query to execute
	 * @param unknown_type $header_array one-dimensional array that receives the field names (column names)
	 * @param unknown_type $value_array array of row-arrays. Each row array contains data as fieldname => fieldvalue pairs
	 */
execute an SQL query and return the results in a two-dimensional array.
@param unknown_type $query_result The query to execute
@param unknown_type $header_array one-dimensional array that receives the field names (column names)
@param unknown_type $value_array array of row-arrays. Each row array contains data as fieldname => fieldvalue pairs
execute an SQL query and return the results in a two - dimensional array . @param unknown_type $query_result The query to execute @param unknown_type $header_array one - dimensional array that receives the field names ( column names ) @param unknown_type $value_array array of row - arrays . Each row array contains data as fieldname = > fieldvalue pairs
function make_result_array( $query_result, &$header_array, &$value_array)
	{
		$field_count = $this->num_fields( $query_result);
		$header_array = array();
		for ( $i = 0; $i < $field_count; ++$i)
		{
			$header_array[] = $this->field_name( $query_result, $i + 1);
		}
		$value_array = array();
		while ($this->fetch_row( $query_result))
		{
			$row = array();
			for ($i = 0; $i < $field_count; ++$i)
			{
				$row[$header_array[$i]] = $this->result( $query_result, $i + 1);
			}
			$value_array[] = $row;
		}
	}
function make_result_array ( $ query_result , & $ header_array , & $ value_array ) { $ field_count = $ this -> num_fields ( $ query_result ) ; $ header_array = array ( ) ; for ( $ i = 0 ; $ i < $ field_count ; ++ $ i ) { $ header_array [ ] = $ this -> field_name ( $ query_result , $ i + 1 ) ; } $ value_array = array ( ) ; while ( $ this -> fetch_row ( $ query_result ) ) { $ row = array ( ) ; for ( $ i = 0 ; $ i < $ field_count ; ++ $ i ) { $ row [ $ header_array [ $ i ] ] = $ this -> result ( $ query_result , $ i + 1 ) ; } $ value_array [ ] = $ row ; } }
execute an SQL query and return the results in a two-dimensional array.
execute an SQL query and return the results in a two - dimensional array .