Function DatabaseDriver->query
Definitions
sources/database.php
- This function is a very basic query executor. It shouldn't usually be used by you, as there are abstracted versions available.
- Visibility: public
- Is abstract?: Yes
- Is static?: No
- Is final?: No
- Return: N/A
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$query | string | required parameter | N/A | N/A | The complete SQL query |
$connection | mixed | required parameter | N/A | N/A | The DB connection |
$max | ?integer | Null | N/A | N/A | The maximum number of rows to affect (null: no limit) |
$start | integer | 0 | N/A | N/A | The start row to affect |
$fail_ok | boolean | False | N/A | N/A | Whether to output an error on failure |
$get_insert_id | boolean | False | N/A | N/A | Whether to get the autoincrement ID created for an insert query |
$save_as_volatile | boolean | False | N/A | N/A | Whether we are saving as a 'volatile' file extension |
Return
- The results (null: no results), or the insert ID
- Type: ?mixed
- Set: N/A
- Range: N/A