Delete a resource by its primary key
@param  mixed $id
@return void
325700
public function delete($id)
    {
        $query = $this->createQueryBuilder();

        $query->where($this->getPrimaryKey($query), $id);
        $query->delete();
    }
355392
public function delete($id)
    {
        $this->request->allowMethod('post');

        /** @var Page $page */
        $page = $this->Pages->get($id);

        if ($this->Pages->delete($page)) {
            $this->Flash->success(__d('wasabi_cms', 'The page <strong>{0}</strong> has been deleted.', $page->name));
        } else {
            $this->Flash->error($this->dbErrorMessage);
        }

        $this->redirect(['action' => 'index']);
        return;
    }
1277642
public function delete($id)
    {
        $this->sqlBuilder->addWhere($this->primaryKey, $id);
        return $this->deletes();
    }
783739
public function deleteRow ($id)
		{
			$this->database->createQuery()
				->delete()
				->from($this->table)
				->where(
					$this->database->createCondition()
						->equal($this->getPrimaryKey(), $id)
				)
				->execute();
		}
245480
public function delete($id)
    {
        $delete = Statement::get(
            'DELETE_OBJECT_INDEX',
            [
                '@collection' => $this->_name,
                '@id' => $this->_connector->quote($id)
            ]
        );
        $delete .= Statement::get(
            'DELETE_OBJECT',
            [
                '@collection' => $this->_name,
                '@id' => $this->_connector->quote($id)
            ]
        );

        $this->_connector->exec($delete);
    }
557238
public function deleteById($id) {
		$this->provider('cache')->cacheClear('db', $this->getDao()->getTableName());
	    $obj = $this->getConnection()->where($this->getDao()->getTableId(), $id);
        return $obj->delete($this->getDao()->getTableName());
	}
939031
private function deleteById($id)
    {
        $builder = $this->repository->createQueryBuilder();
        $builder
            ->remove()
            ->field('id')->equals($id)
            ->getQuery()
            ->execute();
    }
988391
public function delete($id = null)
    {
        if($this->getCriteria()){
            throw new ResourceException('Filtering not supported in DELETE', ResourceException::FILTERS_IN_UNSUPPORTED_METHOD);
        }

        $args = func_get_args();
        if(count($args) == 1){
            $args = $id;
        }

        try {
            $this->client->request($this, 'delete', $args);
        }catch(Exception $ex){
            $this->dispatchException($ex);
        }

        return true;
    }
169923
public function handleDelete($id): void
	{
		if ($this->isAjax()) {
			$this->app->logs->delete($id);
			$grid = $this['logsList'];
			$grid->setDataSource($this->app->logs->logs);
			$grid->reload();
		} else {
			$this->terminate();
		}
	}
857627
public function actionDelete($id)
    {
        $model = $this->findModel($id);
        if ($model->deleteWithRelated()) {
            delete_seo_data($model->product_type, $model->primaryKey);
            Meta::deleteAll([
                'obj_type' => $model->product_type,
                'obj_id'   => $model->primaryKey,
            ]);
            TermRelationships::deleteAll([
                'obj_type' => $model->product_type,
                'obj_id'   => $model->primaryKey,
            ]);
            set_flash_success_delete_content();
        } else {
            set_flash_error_delete_content();
        }

        return $this->goBack(request()->referrer);
    }
30402
public function actionDelete($id)
	{
		//$this->loadModel($id)->delete();

		// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
		//if(!isset($_GET['ajax']))
		//	$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));
                
                
                
                $model = $this->loadModel($id);
				
		$sql = 'ALTER TABLE '.BaseCccdCompanyData::model()->tableName().' DROP `'.$model->varname.'`';
				if ($model->dbConnection->createCommand($sql)->execute()) {
					$model->delete();
				}
			

		// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
		if(!isset($_POST['ajax']))
				$this->redirect(array('admin'));
		
		else
			throw new CHttpException(400,'Invalid request. Please do not repeat this request again.');
	

	}
137929
public function deleteById($id)
	{
		$sql = "DELETE FROM `$this->tableName` WHERE `$this->pkColName` = :entityId ";

		$stmt = $this->pdo->prepare($sql);
		$stmt->bindParam(':entityId', intval($id), \PDO::PARAM_INT);
		$res = $stmt->execute();

		return ($res !== false && $stmt->rowCount() === 1);
	}
147401
public function delete(string $id)
    {
        $this->request->allowMethod('delete');

        $entity = $this->SavedSearches->find()
            ->enableHydration(true)
            ->where(['id' => $id])
            ->first();

        $success = false;
        if (null !== $entity) {
            Assert::isInstanceOf($entity, EntityInterface::class);
            $success = $this->SavedSearches->delete($entity);
        }

        $this->set('success', $success);
        $success ?
            $this->set('data', []) :
            $this->set('error', 'The saved search could not be deleted. Please, try again.');
        $this->set('_serialize', ['success', 'data', 'error']);
    }
632588
public function delete($id) {
        $params = $this->parseUrl($id);

        try {
            $this->getClient()->deleteObject(array(
                'Bucket' => $params['bucket'],
                'Key' => $params['key']
            ));
        } catch (S3Exception $e) {
            return false;
        }

        return true;
    }
1028619
public function _performDelete($id)
    {
        if ($this->model) {
            $this->model->delete($id);
        } else {
            $this->dq->where('id', $id)->delete();
        }
    }
256218
public function delete(string $id)
    {
        $this->setFile($id);
        if (file_exists($this->file)) {
            if ($this->versionamento) {
                $dadosAtuais = $this->get($id);
                $dadosAtuais['userlogin-action'] = "delete";
                unset($dadosAtuais['id']);
                parent::createVerion($this->file, $dadosAtuais);
            }
            unlink($this->file);
        }
    }
293239
public function delete($id)
    {
        $this->trigger('before_delete', $id);

        $this->_database->where($this->primary_key, $id);

        if ($this->soft_delete)
        {
            $result = $this->_database->update($this->_table, array( $this->soft_delete_key => TRUE ));
        }
        else
        {
            $result = $this->_database->delete($this->_table);
        }

        $this->trigger('after_delete', $result);

        return $result;
    }