Function __global->banner_select_sql
Definitions
sources/banners.php
- Get SQL for selecting appropriate banners.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: string
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $b_type | ?ID_TEXT | No | No | Null | N/A | N/A | The banner type needed (null: don't care) |
| $do_type_join | boolean | No | No | False | N/A | N/A | If we want the banner type row joined in |
| $banner_to_avoid | ?string | No | No | Null | N/A | N/A | Do not show this specific banner (null: none to not show) |
| $region | ?string | No | No | Null | N/A | N/A | Region to show for (null: auto-detect) |
Returns
- Banner selection SQL
- Type: string
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Get SQL for selecting appropriate banners.
*
* @param ?ID_TEXT $b_type The banner type needed (null: don't care)
* @param boolean $do_type_join If we want the banner type row joined in
* @param ?string $banner_to_avoid Do not show this specific banner (null: none to not show)
* @param ?string $region Region to show for (null: auto-detect)
* @return string Banner selection SQL
*/
function banner_select_sql(?string $b_type = null, bool $do_type_join = false, ?string $banner_to_avoid = null, ?string $region = null) : string
* Get SQL for selecting appropriate banners.
*
* @param ?ID_TEXT $b_type The banner type needed (null: don't care)
* @param boolean $do_type_join If we want the banner type row joined in
* @param ?string $banner_to_avoid Do not show this specific banner (null: none to not show)
* @param ?string $region Region to show for (null: auto-detect)
* @return string Banner selection SQL
*/
function banner_select_sql(?string $b_type = null, bool $do_type_join = false, ?string $banner_to_avoid = null, ?string $region = null) : string
