StatementEmpty::fetch

public StatementEmpty::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, formatted a

StatementEmpty::fetchAllAssoc

public StatementEmpty::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 fetch m

StatementEmpty::fetchAllKeyed

public StatementEmpty::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 the a

StatementEmpty::current

public StatementEmpty::current() File core/lib/Drupal/Core/Database/StatementEmpty.php, line 116 Class StatementEmpty Empty implementation of a database statement. Namespace Drupal\Core\Database Code public function current() { return NULL; }

StatementEmpty::fetchAll

public StatementEmpty::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/State

StatementEmpty::execute

public StatementEmpty::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/StatementEmpty.php, line 29 Class StatementEmpty Empty implementation of a database statement. N

Statement::__construct

protected Statement::__construct(Connection $dbh) File core/lib/Drupal/Core/Database/Statement.php, line 34 Class Statement Default implementation of StatementInterface. Namespace Drupal\Core\Database Code protected function __construct(Connection $dbh) { $this->dbh = $dbh; $this->setFetchMode(\PDO::FETCH_OBJ); }

StatementEmpty::$allowRowCount

Is rowCount() execution allowed. Type: bool File core/lib/Drupal/Core/Database/StatementEmpty.php, line 24 Class StatementEmpty Empty implementation of a database statement. Namespace Drupal\Core\Database Code public $allowRowCount = FALSE;

StatementEmpty

Empty implementation of a database statement. This class satisfies the requirements of being a database statement/result object, but does not actually contain data. It is useful when developers need to safely return an "empty" result set without connecting to an actual database. Calling code can then treat it the same as if it were an actual result set that happens to contain no records. Hierarchy class \Drupal\Core\Database\StatementEmpty implements \Iterator, StatementInterface See also \

Statement::rowCount

public Statement::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/Statement.php, line 136 Class Statement Default implementation of StatementInterface.