Creates a DELETE command.
@param mixed $table the table schema ({@link CDbTableSchema}) or the table name (string).
@param CDbCriteria $criteria the query criteria
@return CDbCommand delete command.
332824
public function createDeleteCommand($table,$criteria)
	{
		$this->ensureTable($table);
		$sql="DELETE FROM {$table->rawName}";
		$sql=$this->applyJoin($sql,$criteria->join);
		$sql=$this->applyCondition($sql,$criteria->condition);
		$sql=$this->applyGroup($sql,$criteria->group);
		$sql=$this->applyHaving($sql,$criteria->having);
		$sql=$this->applyOrder($sql,$criteria->order);
		$sql=$this->applyLimit($sql,$criteria->limit,$criteria->offset);
		$command=$this->_connection->createCommand($sql);
		$this->bindValues($command,$criteria->params);
		return $command;
	}
230160
public function dbDelete($table, $item, $key = 'id')
    {
        $result = Eresus_CMS::getLegacyKernel()->db->
            delete($this->__table($table), "`$key` = '".(is_array($item)? $item[$key] : $item)."'");

        return $result;
    }
879573
public function from(string $table = null): Delete
    {
        $this->from = [];
        if (!\is_string($table) && !\is_array($table)) {
            throw new InvalidArgumentException('$table has to be an array or a string');
        }
        $this->from = $this->namesClass->parse($table, true);

        return $this;
    }
413822
public function delete($table, $condition)
	{
        Eresus_Kernel::log(__METHOD__, LOG_NOTICE, 'This method is deprecated');
		$q = Eresus_DB::getHandler()->createDeleteQuery();
		$q->deleteFrom($table)
			->where($condition);
        $q->execute();
		return null;
	}
294966
protected function _delete($table)
	{
		if ($this->qb_limit)
		{
			return 'WITH ci_delete AS (SELECT TOP '.$this->qb_limit.' * FROM '.$table.$this->_compile_wh('qb_where').') DELETE FROM ci_delete';
		}

		return parent::_delete($table);
	}
981954
public function delete($where, $table = null)
    {
        if (is_array($where)) {
            $pk = $where[$this->getPrimaryKey()];
        } else {
            $pk = (int)$where;
        }

        $row = $this->getPosition($pk);

        $where = new Where;
        $where->between(self::COLUMN_LEFT, $row->getLft(), $row->getRgt());

        $result = parent::delete($where, $table);

        if ($result) {
            $this->updateTree($row->getRgt(), '-', $row->width());
        }

        return $result;
    }
1276259
public function delete($table, $where)
    {
        $context = $this->getCommandContext();
        $context->table    = $table;
        $context->data    = null;
        $context->where    = $where;
        $context->operation    = AnDatabase::OPERATION_DELETE;

        //Excute the delete operation
        if ($this->getCommandChain()->run('before.delete', $context) !== false) {
            //Create query statement
            $context->query = 'DELETE FROM '.$this->quoteName($this->getTableNeedle().$context->table)
                  .' '.$context->where
            ;

            //Execute the query
            $context->result = $this->execute($context->query);

            $context->affected = $this->_affected_rows;
            $this->getCommandChain()->run('after.delete', $context);
        }

        return $context->affected;
    }
182941
public function innerJoin(string $table, $criteria = null, string $alias = null): self
    {
        $table = $this->getTableNameByClassName($table);
        $this->join($table, $criteria, self::INNER_JOIN, $alias);

        return $this;
    }
865208
public function grabFromDatabase( $table, $columns, $criteria = array() ) {
		$query = $this->_prepareQuery( $table, $columns, $criteria );
		$this->debugSection( 'Query', $query );

		$suppress_errors = $this->_wpdb->suppress_errors( true );
		$results = $this->_wpdb->get_results( $query );
		$this->_wpdb->suppress_errors( $suppress_errors );

		if ( ! empty( $this->_wpdb->last_error ) ) {
			$this->fail( 'Database error: ' . $this->_wpdb->last_error );
			return;
		}

		return $results;
	}
526651
public static function delete($table,$where=[])
    {
        $bind=[];
        if(empty($where)){
            $where='';
        }else{
            $w=new Where($where);
            $where=' WHERE '.$w->parseWhere();
            $bind=array_merge($bind,$w->parseBind());
        }
        $sql=sprintf('DELETE FROM `:%s` %s',$table,$where);
        $bind=array_merge($bind,$bind);
        return self::execute($sql,$bind);
    }
972925
public function delete($table = '', $id = '')
    {
        $sql = 'DELETE FROM '.$table.' WHERE id='.$id;
        echo $sql.'<br/>';
        return $this->execute($sql);
    }
1121135
public function dropColumn($table, $columnName)
    {
        $table = $this->prefixTable($table);

        return $this->container->make('Piwik\Updater\Migration\Db\DropColumn', array(
            'table' => $table, 'columnName' => $columnName
        ));
    }
240158
public function del($table, $cond=null)
	{
		return Sql::assistant( $this->ds )->del($table, $cond);
	}
442609
public static function deleteColumn(string $tableName, string $column)
    {
        if(Schema::hasTable($tableName)) {
            Schema::table(
                $tableName, function ($table) use ($tableName, $column) {
                    if(Schema::hasColumn($tableName, $column)) {
                        $table->dropColumn($column);
                    }
                }
            );
        }
    }
132151
public function delete($table){        
        $res= FALSE;
        try{
            //Armo y preparo la consulta
            $query= $this->prepareDelete($table, $this->where);
            //Ejecuto la consulta
            $query->execute($this->where_values);            
            //Veo si salio todo bien
            $res= $this->isOk($query);
            //Limpio las variables del AR
            $this->cleanVars();
        } catch (\PDOException $e) {
            $this->cleanVars();
            throw $e;
        }
        return $res;
    }
725366
public function deleteTable($table)
    {
        if (null !== $this->logger) {
            $this->log('Delete table '.$table);
        }

        $parameters = array(
            'TableName' => $table,
        );

        if (null !== $this->logger) {
            $this->log('DeleteTable request paramaters : '.print_r($parameters, true), Logger::DEBUG);
        }

        $response = $this->connector->deleteTable($parameters);

        if (null !== $this->logger) {
            $this->log('DeleteTable request response : '.print_r($response, true), Logger::DEBUG);
        }
    }
565121
public function deleteById($table, $id, $id_col = 'id')
    {
        $options = array(
            'W' => '`' . $id_col . "`='" . $this->escape($id) . "'",
            'L' => '1',
        );
        return $this->delete($table, $options);
    }