public function deleteData($query, array $params = [])
{
if ($this->logger) {
$this->logger->info("DB query {$query}");
}
$connection = $this->getConnection('write');
$this->invalidateQueryCache();
$stmt = $this->executeQuery("{$query}", $connection, $params);
return (int) $stmt->rowCount();
}
/** * Removes a config setting. * * @param string $name The name of the field. * * @return bool Success or failure */ function remove($name) { $name = trim($name); if (isset($this->CONFIG->{$name})) { unset($this->CONFIG->{$name}); } $query = "\n\t\t\tDELETE FROM {$this->CONFIG->dbprefix}config\n\t\t\tWHERE name = :name\n\t\t"; $params = [':name' => $name]; $this->boot->invalidateCache(); return $this->db->deleteData($query, $params) !== false; }