From Aspen Documentation
Runs the generated query and appends any additional info we've selected.
An array is returned and any resulting records are in the RECORDS key of the array. Any other information outside of the records, will be included in the top level of the array.
Since 1.0
Arguments
array results ([string $key_field = false], [string $sql = false])
- key_field
- Which selected field should be returned as the recordset array indexes.
- sql
- An SQL query that needs to be run through the results function.
Returns
Returns an array.
Notes
- Calculations and pagination totaling functions are applied at this stage.
Examples
Example:
$this->APP->model->enablePagination();
$this->APP->model->select('blog');
$this->APP->model->paginate(1, 25);
$this->APP->model->results();
Returns: