function InsertQuery_sqlite::execute

Overrides InsertQuery::execute

File

includes/database/sqlite/query.inc, line 22

Class

InsertQuery_sqlite
SQLite specific implementation of InsertQuery.

Code

public function execute() {
    if (!$this->preExecute()) {
        return NULL;
    }
    if (count($this->insertFields) || !empty($this->fromQuery)) {
        return parent::execute();
    }
    else {
        return $this->connection
            ->query('INSERT INTO {' . $this->table . '} DEFAULT VALUES', array(), $this->queryOptions);
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.