Function Database_Static_xml->_parse_query_select

Definitions

sources/database/xml.php

  • Parse a SELECT query.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$tokens array No No required parameter N/A N/A Tokens
$query string No No required parameter N/A N/A Query that was executed
$db array No No required parameter N/A N/A Database connection
$max ?integer No No required parameter N/A N/A The maximum number of rows to affect (null: no limit)
$start integer No No required parameter N/A N/A The start row to affect
$fail_ok boolean No No required parameter N/A N/A Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
&$at integer Yes No required parameter N/A N/A Our offset counter
$do_end_check boolean No No True N/A N/A Whether to not do the check to make sure we've parsed everything

Returns

  • A tuple of query parts (null: error)
  • Type: ?array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Parse a SELECT query.
 *
 * @param  array $tokens Tokens
 * @param  string $query Query that was executed
 * @param  array $db Database connection
 * @param  ?integer $max The maximum number of rows to affect (null: no limit)
 * @param  integer $start The start row to affect
 * @param  boolean $fail_ok Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
 * @param  integer $at Our offset counter
 * @param  boolean $do_end_check Whether to not do the check to make sure we've parsed everything
 * @return ?array A tuple of query parts (null: error)
 */

protected function _parse_query_select(array $tokens, string $query, array $db, ?int $max, int $start, bool $fail_ok, int &$at, bool $do_end_check = true) : ?array