StatementPrefetch::fetchField

public StatementPrefetch::fetchField($index = 0) Returns a single field from the next record of a result set. Parameters $index: The numeric index of the field to return. Defaults to the first field. Return value A single field from the next record, or FALSE if there is no next record. Overrides StatementInterface::fetchField File core/lib/Drupal/Core/Database/StatementPrefetch.php, line 405 Class StatementPrefetch An implementation of StatementInterface that prefetches all data. Names

StatementPrefetch::fetchColumn

public StatementPrefetch::fetchColumn($index = 0) File core/lib/Drupal/Core/Database/StatementPrefetch.php, line 390 Class StatementPrefetch An implementation of StatementInterface that prefetches all data. Namespace Drupal\Core\Database Code public function fetchColumn($index = 0) { if (isset($this->currentRow) && isset($this->columnNames[$index])) { // We grab the value directly from $this->data, and format it. $return = $this->currentRow[$this->colum

StatementPrefetch::fetchCol

public StatementPrefetch::fetchCol($index = 0) Returns an entire single column of a result set as an indexed array. Note that this method will run the result set to the end. Parameters $index: The index of the column number to fetch. Return value An indexed array, or an empty array if there is no result set. Overrides StatementInterface::fetchCol File core/lib/Drupal/Core/Database/StatementPrefetch.php, line 481 Class StatementPrefetch An implementation of StatementInterface that prefetc

StatementPrefetch::fetchAssoc

public StatementPrefetch::fetchAssoc() Fetches the next row and returns it as an associative array. This method corresponds to PDOStatement::fetchObject(), but for associative arrays. For some reason PDOStatement does not have a corresponding array helper method, so one is added. Return value An associative array, or FALSE if there is no next row. Overrides StatementInterface::fetchAssoc File core/lib/Drupal/Core/Database/StatementPrefetch.php, line 440 Class StatementPrefetch An implemen

StatementPrefetch::fetchAllKeyed

public StatementPrefetch::fetchAllKeyed($key_index = 0, $value_index = 1) Returns the entire result set as a single associative array. This method is only useful for two-column result sets. It will return an associative array where the key is one column from the result set and the value is another field. In most cases, the default of the first two columns is appropriate. Note that this method will run the result set to the end. Parameters $key_index: The numeric index of the field to use as th

StatementPrefetch::fetchAllAssoc

public StatementPrefetch::fetchAllAssoc($key, $fetch_style = NULL) Returns the result set as an associative array keyed by the given field. If the given key appears multiple times, later records will overwrite earlier ones. Parameters $key: The name of the field on which to index the array. $fetch: The fetchmode to use. If set to PDO::FETCH_ASSOC, PDO::FETCH_NUM, or PDO::FETCH_BOTH the returned value with be an array of arrays. For any other value it will be an array of objects. By default, th

StatementPrefetch::fetchAll

public StatementPrefetch::fetchAll($mode = NULL, $column_index = NULL, $constructor_arguments = NULL) Returns an array containing all of the result set rows. Parameters $mode: One of the PDO::FETCH_* constants. $column_index: If $mode is PDO::FETCH_COLUMN, the index of the column to fetch. $constructor_arguments: If $mode is PDO::FETCH_CLASS, the arguments to pass to the constructor. Return value An array of results. Overrides StatementInterface::fetchAll File core/lib/Drupal/Core/Database/St

StatementPrefetch::fetch

public StatementPrefetch::fetch($fetch_style = NULL, $cursor_orientation = \PDO::FETCH_ORI_NEXT, $cursor_offset = NULL) Fetches the next row from a result set. See http://php.net/manual/pdo.constants.php for the definition of the constants used. Parameters $mode: One of the PDO::FETCH_* constants. Default to what was specified by setFetchMode(). $cursor_orientation: Not implemented in all database drivers, don't use. $cursor_offset: Not implemented in all database drivers, don't use. Return va

StatementPrefetch::execute

public StatementPrefetch::execute($args = array(), $options = array()) Executes a prepared statement Parameters $args: An array of values with as many elements as there are bound parameters in the SQL statement being executed. $options: An array of options for this query. Return value TRUE on success, or FALSE on failure. Overrides StatementInterface::execute File core/lib/Drupal/Core/Database/StatementPrefetch.php, line 139 Class StatementPrefetch An implementation of StatementInterface

StatementPrefetch::current

public StatementPrefetch::current() Return the current row formatted according to the current fetch style. This is the core method of this class. It grabs the value at the current array position in $this->data and format it according to $this->fetchStyle and $this->fetchMode. Return value mixed The current row formatted as requested. File core/lib/Drupal/Core/Database/StatementPrefetch.php, line 268 Class StatementPrefetch An implementation of StatementInterface that prefetches a