public function DeleteQuery_sqlite::execute

cis7 query.inc public DeleteQuery_sqlite::execute()
cle7 query.inc public DeleteQuery_sqlite::execute()
elmsmedia7 query.inc public DeleteQuery_sqlite::execute()
icor7 query.inc public DeleteQuery_sqlite::execute()
meedjum_blog7 query.inc public DeleteQuery_sqlite::execute()
mooc7 query.inc 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();
  }
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.