Function DatabaseConnector->query_select_value

Definitions

sources/database.php

  • Get the specified value from the database. This is the specified value of the first row returned. A fatal error is produced if there is no matching row.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Return: N/A

Parameters

Name Type Default Set Range Description
$table string required parameter N/A N/A The table name
$selected_value string required parameter N/A N/A The field to select
$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
$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 first value of the first row returned
  • Type: mixed
  • Set: N/A
  • Range: N/A