diff options
Diffstat (limited to 'includes/database/database.inc')
-rw-r--r-- | includes/database/database.inc | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/includes/database/database.inc b/includes/database/database.inc index 7ac323a37..c66bb79af 100644 --- a/includes/database/database.inc +++ b/includes/database/database.inc @@ -184,16 +184,6 @@ abstract class DatabaseConnection extends PDO { /** - * Reference to the last statement that was executed. - * - * We only need this for the legacy db_affected_rows() call, which will be removed. - * - * @var DatabaseStatementInterface - * @todo Remove this variable. - */ - public $lastStatement; - - /** * The database target this connection is for. * * We need this information for later auditing and logging. @@ -1681,7 +1671,6 @@ class DatabaseStatementBase extends PDOStatement implements DatabaseStatementInt $this->setFetchMode($options['fetch']); } } - $this->dbh->lastStatement = $this; $logger = $this->dbh->getLogger(); if (!empty($logger)) { @@ -2539,21 +2528,6 @@ function db_last_insert_id($table, $field) { } /** - * Determine the number of rows changed by the preceding query. - * - * This may not work, actually, without some tricky temp code. - * - * @todo Remove this function when all queries have been ported to db_update(). - */ -function db_affected_rows() { - $statement = Database::getConnection()->lastStatement; - if (!$statement) { - return 0; - } - return $statement->rowCount(); -} - -/** * Helper function for db_rewrite_sql. * * Collects JOIN and WHERE statements via hook_db_rewrite_sql() |