DatabaseStatementInterface
interface DatabaseStatementInterface
Represents a prepared statement.
Some methods in that class are purposefully commented out. Due to a change in how PHP defines PDOStatement, we can't define a signature for those methods that will work the same way between versions older than 5.2.6 and later versions. See http://bugs.php.net/bug.php?id=42452 for more details.
Child implementations should either extend PDOStatement:
class DatabaseStatement_oracle extends PDOStatement implements DatabaseStatementInterface {}
or define their own class. If defining their own class, they will also have to implement either the Iterator or IteratorAggregate interface before DatabaseStatementInterface:
class DatabaseStatement_oracle implements Iterator, DatabaseStatementInterface {}
Hierarchy
- interface \DatabaseStatementInterface extends \Traversable
Expanded class hierarchy of DatabaseStatementInterface
All classes that implement DatabaseStatementInterface
Related topics
File
- includes/database/database.inc, line 1989
- Core systems for the database layer.
Members
Name | Modifiers | Type | Description |
---|---|---|---|
DatabaseStatementInterface::execute | public | function | Executes a prepared statement |
DatabaseStatementInterface::fetchAllAssoc | public | function | Returns the result set as an associative array keyed by the given field. |
DatabaseStatementInterface::fetchAllKeyed | public | function | Returns the entire result set as a single associative array. |
DatabaseStatementInterface::fetchAssoc | public | function | Fetches the next row and returns it as an associative array. |
DatabaseStatementInterface::fetchCol | public | function | Returns an entire single column of a result set as an indexed array. |
DatabaseStatementInterface::fetchField | public | function | Returns a single field from the next record of a result set. |
DatabaseStatementInterface::getQueryString | public | function | Gets the query string of this statement. |
DatabaseStatementInterface::rowCount | public | function | Returns the number of rows affected by the last SQL statement. |
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/includes!database!database.inc/interface/DatabaseStatementInterface/7.x