Previous Page
dump()

Solar_Model_Areas
fetch()

Next Page
fetchAll()

fetch()

public Solar_Sql_Model_Record|Solar_Sql_Model_Collection fetch ( int|array $spec, array $params default NULL )

Fetches a record or collection by primary key value(s).

Inherited from Solar_Sql_Model.

Parameters

  • (int|array) $spec: The primary key value for a single record, or an array of primary key values for a collection of records.
  • (array) $params: An array of parameters for the fetch, with keys for 'cols', 'group', 'having', 'order', etc. Note that the 'where' and 'order' elements are overridden and have no effect.

Returns

  • (Solar_Sql_Model_Record|Solar_Sql_Model_Collection) A record or record-set object.

Description

Fetches a record or collection by primary key value(s).