|
Previous Page |
Solar_Model_Nodes |
Next Page |
fetchAssoc()
The same as fetchAll(), except the record collection is keyed on the first column of the results (instead of being a strictly sequential array.) Recognized parameters for the fetch are: eager : (string|array) Eager-fetch records from these related models.
Inherited from Solar_Sql_Model.
Parameters
- (array)
$params: An array of parameters for the fetch, with keys for 'cols', 'where', 'group', 'having', 'order', etc.
Returns
- (Solar_Sql_Model_Collection) A collection object.
Description
The same as fetchAll(), except the record collection is keyed on the first column of the results (instead of being a strictly sequential array.) Recognized parameters for the fetch are: eager : (string|array) Eager-fetch records from these related models.
distinct- (bool) Use DISTINCT?
cols- (string|array) Return only these columns.
where- (string|array) A Solar_Sql_Select::multiWhere() value parameter to restrict which records are returned.
group- (string|array) GROUP BY these columns.
having- (string|array) HAVING these column values.
order- (string|array) ORDER BY these columns.
paging- (int) Return this many records per page.
page- (int) Return only records from this page-number.
limit- (int|array) Limit to a count of this many records (when an integer),
or limit by count and offset (when an array). When
limitis non- empty, thepageandpagingparams are ignored. bind- (array) Key-value pairs to bind into the query.
cache- (bool) Use the cache?
cache_key- (bool) An explicit cache key to use; otherwise, defaults to the serialized SELECT params.
Local
- Overview
- Constants
- Properties
- Methods
- __call()
- __construct()
- __destruct()
- __get()
- _addFilter()
- _addRelated()
- _belongsTo()
- _createTableAndIndexes()
- _exception()
- _fetchResultSelect()
- _fixCache()
- _fixFilters()
- _fixIndex()
- _fixModelName()
- _fixOrder()
- _fixPropertyCols()
- _fixStack()
- _fixTableCols()
- _fixTableName()
- _fixTagList()
- _hasMany()
- _hasOne()
- _setCollectionPagerInfo()
- _setup()
- apiVersion()
- countPages()
- delete()
- dump()
- fetch()
- fetchAll()
- fetchAllByTags()
- fetchArray()
- fetchAssoc()
- fetchCol()
- fetchNew()
- fetchOne()
- fetchPairs()
- fetchValue()
- fixSelectParams()
- free()
- getPaging()
- getRelated()
- insert()
- locale()
- newCollection()
- newRecord()
- newSelect()
- serializeCols()
- setPaging()
- unserializeCols()
- update()