Function __global->get_search_rows

Definitions

sources/database_search.php

  • Get some rows, queried from the database according to the search parameters.
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: array

Parameters

Name Type Default Set Range Description
$meta_type ?ID_TEXT required parameter N/A N/A The META type used by our content (null: Cannot support META search)
$id_field string required parameter N/A N/A The ID field that can be used to de-duplicate results / connect to the meta table; if there are multiple fields then delimit them with ':'
$search_query string required parameter N/A N/A Search query
$content_where string required parameter N/A N/A WHERE clause that selects the content according to the search query; passed in addition to $search_query to avoid unnecessary reparsing. ? refers to the yet-unknown field name (blank: full-text search)
$where_clause string required parameter N/A N/A The WHERE clause
$only_search_meta boolean required parameter N/A N/A Whether to only do a META (tags) search
$only_titles boolean required parameter N/A N/A Whether to only search titles (as opposed to both titles and content)
$max integer required parameter N/A N/A Start position in total results
$start integer required parameter N/A N/A Maximum results to return in total
$order ID_TEXT required parameter N/A N/A What to order by
$direction ID_TEXT required parameter N/A N/A Order direction
$table ID_TEXT required parameter N/A N/A The table name
$select string * N/A N/A What to select
$trans_fields array [] N/A N/A The translatable fields to search over (or an !=>! which is skipped, or an <blank>=><blank> which is skipped). The first of these will be the title field unless it is !=>! (in which case the title fields will be the first raw-field) or <blank>=><blank> (in which case there is no title field)
$raw_fields array [] N/A N/A The non-translatable fields to search over
$permissions_module ?string Null N/A N/A The permission module to check category access for (null: none)
$permissions_field ?string Null N/A N/A The field that specifies the permissions ID to check category access for (null: none)
$permissions_field_is_string boolean False N/A N/A Whether the permissions field is a string

Return

  • The rows found
  • Type: array
  • Set: N/A
  • Range: N/A