Function DatabaseConnector->query_select
Definitions
sources/database.php
- Get the database rows found matching the specified parameters. Unlike 'query', it doesn't take raw SQL -- it assembles SQL based the parameters requested.Only use this if you're where condition is a series of AND clauses doing simple property comparisons.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Return: array
Parameters
Name | Type | Default | Set | Range | Description |
---|---|---|---|---|---|
$table | string | required parameter | N/A | N/A | The table name |
$select | array | [ "*" ] | N/A | N/A | The SELECT map |
$where_map | array | [] | N/A | N/A | The WHERE map [will all be ANDed together] |
$end | string | Blank (empty string) | N/A | N/A | Something to tack onto the end of the SQL query |
$max | ?integer | Null | N/A | N/A | The maximum number of rows to select (null: get all) |
$start | integer | 0 | N/A | N/A | The starting row to select |
$fail_ok | boolean | False | N/A | N/A | Whether to allow failure (outputting a message instead of exiting completely) |
$lang_fields | ?array | Null | N/A | N/A | Extra language fields to join in for cache pre-filling / Tempcode, perhaps via the find_lang_fields function. You only need to send this if you are doing a JOIN and carefully craft your query so table field names won't conflict (null: auto-detect, if not a join) |
Return
- The results (empty array: empty result set) (null: error)
- Type: ?array
- Set: N/A
- Range: N/A