Previous Page
fetchOne()

Solar_Sql_Adapter_Mysql
fetchPairs()

Next Page
fetchPdo()

fetchPairs()

public array fetchPairs ( array|string $spec, array $data default array () )

Fetches an associative array of all rows as key-value pairs (first column is the key, second column is the value).

Inherited from Solar_Sql_Adapter.

Parameters

  • (array|string) $spec: An array of component parts for a SELECT, or a literal query string.
  • (array) $data: An associative array of data to bind into the SELECT statement.

Returns

  • (array)

Description

Fetches an associative array of all rows as key-value pairs (first column is the key, second column is the value).