public function DeleteQuery_sqlite::execute
public DeleteQuery_sqlite::execute()
Executes the DELETE query.
Return value
The return value is dependent on the database connection.
Overrides DeleteQuery::execute
File
- includes/database/sqlite/query.inc, line 111
- Query code for SQLite embedded database engine.
Class
- DeleteQuery_sqlite
- SQLite specific implementation of DeleteQuery.
Code
public function execute() { if (!count($this->condition)) { $total_rows = $this->connection->query('SELECT COUNT(*) FROM {' . $this->connection->escapeTable($this->table) . '}')->fetchField(); parent::execute(); return $total_rows; } else { return parent::execute(); } }
© 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!sqlite!query.inc/function/DeleteQuery_sqlite::execute/7.x