Solar_Sql_Model::fetch()
public
Solar_Sql_Model_Record|Solar_Sql_Model_Collection
Solar_Sql_Model::fetch
( int|array $spec
, array $fetch = NULL
)
Fetches a record or collection by primary key value(s).
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)
$fetch
: 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).