StatementInterface::rowCount

public StatementInterface::rowCount() Returns the number of rows affected by the last SQL statement. Return value The number of rows affected by the last DELETE, INSERT, or UPDATE statement executed or throws \Drupal\Core\Database\RowCountException if the last executed statement was SELECT. Throws \Drupal\Core\Database\RowCountException File core/lib/Drupal/Core/Database/StatementInterface.php, line 74 Class StatementInterface Represents a prepared statement. Namespace Drupal\Core\Dat

StatementInterface::fetchAssoc

public StatementInterface::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. File core/lib/Drupal/Core/Database/StatementInterface.php, line 143 Class StatementInterface Represents a prepared statement. Namespace Dru

StatementInterface::fetchField

public StatementInterface::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. File core/lib/Drupal/Core/Database/StatementInterface.php, line 123 Class StatementInterface Represents a prepared statement. Namespace Drupal\Core\Database Code public function fetchField($index = 0)

StatementInterface::fetchAllKeyed

public StatementInterface::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 t

StatementInterface::fetchAllAssoc

public StatementInterface::fetchAllAssoc($key, $fetch = 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, the fet

StatementInterface::fetchAll

StatementInterface::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. File core/lib/Drupal/Core/Database/StatementInterface.php, line 158 Class Stat

StatementInterface

Represents a prepared statement. Child implementations should either extend PDOStatement: class Drupal\Core\Database\Driver\oracle\Statement extends PDOStatement implements Drupal\Core\Database\StatementInterface {} or define their own class. If defining their own class, they will also have to implement either the Iterator or IteratorAggregate interface before Drupal\Core\Database\StatementInterface: class Drupal\Core\Database\Driver\oracle\Statement implements Iterator, Drupal\Core\Database\

StatementInterface::fetch

public StatementInterface::fetch($mode = NULL, $cursor_orientation = NULL, $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 value A result, formatt

StatementInterface::execute

public StatementInterface::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. File core/lib/Drupal/Core/Database/StatementInterface.php, line 54 Class StatementInterface Represents a prepared statement. Namespace Drupal\Core\Database Code pu

StatementEmpty::rowCount

public StatementEmpty::rowCount() Returns the number of rows affected by the last SQL statement. Return value The number of rows affected by the last DELETE, INSERT, or UPDATE statement executed or throws \Drupal\Core\Database\RowCountException if the last executed statement was SELECT. Throws \Drupal\Core\Database\RowCountException Overrides StatementInterface::rowCount File core/lib/Drupal/Core/Database/StatementEmpty.php, line 43 Class StatementEmpty Empty implementation of a database