Function __global->db_map_restrict
Definitions
sources/database.php
- Extract certain fields, including any Tempcode details for them, from a DB table row array.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: array
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $row | array | No | No | required parameter | N/A | N/A | DB table row |
| $fields | array | No | No | required parameter | N/A | N/A | List of fields to copy through |
| $remap | array | No | No | [] | N/A | N/A | Remapping of fields, if we need to do some kind of substitution as well (usually this will be because the row came from a join and we had to rename fields) |
Returns
- Map of fields
- Type: array
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Extract certain fields, including any Tempcode details for them, from a DB table row array.
*
* @param array $row DB table row
* @param array $fields List of fields to copy through
* @param array $remap Remapping of fields, if we need to do some kind of substitution as well (usually this will be because the row came from a join and we had to rename fields)
* @return array Map of fields
*/
function db_map_restrict(array $row, array $fields, array $remap = []) : array
* Extract certain fields, including any Tempcode details for them, from a DB table row array.
*
* @param array $row DB table row
* @param array $fields List of fields to copy through
* @param array $remap Remapping of fields, if we need to do some kind of substitution as well (usually this will be because the row came from a join and we had to rename fields)
* @return array Map of fields
*/
function db_map_restrict(array $row, array $fields, array $remap = []) : array
