Function __global->_selectcode_subtree_fetch

Definitions

sources/selectcode.php

  • Helper function to fetch a subtree from the database.
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: array

Parameters

Name Type Default Set Range Description
$look_under string required parameter N/A N/A The category-ID we are searching under
$table_name ?string required parameter N/A N/A The database's table that contains parent/child relationships in the record-set's category-set (the category-set is equal to the record-set if we're matching categories, but not if we're matching entries) (null: don't support subtree [*-style] searches)
$parent_name ?string required parameter N/A N/A The database's field name for the category-set's parent-category-ID (null: don't support subtree [*-style] searches beyond the tree base)
$field_name string required parameter N/A N/A The database's field name for the category-set's category-ID
$numeric_ids boolean required parameter N/A N/A Whether the category-set IDs are numeric
$db object required parameter N/A N/A Database connector to use
$cached_mappings ?array required parameter N/A N/A A place to store cached data we've already loaded once in this function. Pass in an null variable (not a null literal) (null: none yet)
$first boolean True N/A N/A Whether this is the base call to this recursive function (just leave it as the default, true)
$recurse boolean True N/A N/A Whether to run recursively

Return

  • Subtree: list of IDs in category-set
  • Type: array
  • Set: N/A
  • Range: N/A