Personal tools
From wiki.swiftlytilting.com
Jump to: navigation, search

WinBinder Manual/db fetch array

Retrieves an array from a resource.

Syntax

array db_fetch_array(resource sqlresult [, type])

NOTE: This is a SQL function. See <winterpostwiki>Database support</winterpostwiki> for more information.

Arguments

  • sqlresult is the resource handle returned from a SQL query.
  • type defines the kind of array (numerical, associative or both).

Accepted values are FETCH_BOTH (the default), FETCH_NUM and FETCH_ASSOC.

Result

An array with the results of the fetched resource.

Example

// List the field(column) "Tel./Fax" in mytable

$result = db_query("SELECT 'Tel./Fax' FROM mytable");
$tel_fx_nrs = db_fetch_array($result);

See also


Winbinder Projects