Function Database_Static_xml->_execute_query_select

Definitions

sources/database/xml.php

  • Execute a parsed SELECT query.
  • Visibility: protected
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$select array No No required parameter N/A N/A Select constructs
$as ?string No No required parameter N/A N/A The renaming of our table, so we can recognise it in the join condition (null: no renaming)
$joins array No No required parameter N/A N/A Join constructs
$where_expr array No No required parameter N/A N/A Where constructs
$group_by ?array No No required parameter N/A N/A Grouping by constructs (null: none)
$having ?array No No required parameter N/A N/A Having construct (null: none)
$orders ?array No No required parameter N/A N/A Ordering string for sort_maps_by (null: none)
$unions array No No required parameter N/A N/A Union constructs
$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
$is_distinct boolean No No required parameter N/A N/A Whether this is a distinct query, and thus de-duplication will be required
$bindings array No No required parameter N/A N/A Bindings available in the execution scope
$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)
&$schema ?array Yes No Null N/A N/A Schema filled in function (null: none passed)

Returns

  • The results (null: no results)
  • Type: ?mixed
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Execute a parsed SELECT query.
 *
 * @param  array $select Select constructs
 * @param  ?string $as The renaming of our table, so we can recognise it in the join condition (null: no renaming)
 * @param  array $joins Join constructs
 * @param  array $where_expr Where constructs
 * @param  ?array $group_by Grouping by constructs (null: none)
 * @param  ?array $having Having construct (null: none)
 * @param  ?array $orders Ordering string for sort_maps_by (null: none)
 * @param  array $unions Union constructs
 * @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 $is_distinct Whether this is a distinct query, and thus de-duplication will be required
 * @param  array $bindings Bindings available in the execution scope
 * @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  ?array $schema Schema filled in function (null: none passed)
 * @return ?mixed The results (null: no results)
 */

protected function _execute_query_select(array $select, ?string $as, array $joins, array $where_expr, ?array $group_by, ?array $having, ?array $orders, array $unions, string $query, array $db, ?int $max, int $start, bool $is_distinct, array $bindings, bool $fail_ok, ?array &$schema = null)