Creates delete request.
@param string $table
@param array $condition
@param array $options
@return AbstractRequest
772359
public function delete($table, $condition = [], array $options = [])
    {
        $query = $this->createQuery('delete', $table, $options)->where($condition);

        return $this->createRequest($query);
    }
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;
    }
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;
    }
767368
public function deleteFrom(string $table, array $where): int
    {
        $delete = new Delete($this->options);
        $sqlParams = $delete->buildQuery($table, $where);
        return $this->query($sqlParams->getSql(), $sqlParams->getParams())->getAffected();
    }
462466
public function delete(string $table, array $criteria = []): int {
		
		// this one is like the insertSingle above in that it uses its parameters
		// to build a query.  unlike that one, we execute it here and return the
		// number of deleted rows.
		
		$statement = "DELETE FROM $table";
		
		if (sizeof($criteria) > 0) {
			
			// we want to take our column names and turn them into a string
			// like x=? AND y=? AND z=? so that we can tack it onto our
			// $statement
			
			$columns = array_keys($criteria);
			array_walk($columns, function(&$x) {
				$x = sprintf("%s%s%s = ?", $this->columnPrefix, $x, $this->columnSuffix);
			});
			$statement .= " WHERE " . join(" AND ", $columns);
		}
		
		$bindings = array_values($criteria);
		
		try {
			return $this->dbConn->fetchAffected($statement, $bindings);
		} catch (\PDOException $pdoException) {
			throw $this->prepareDatabaseException($pdoException, $statement, $bindings);
		}
	}
1176887
public static function deleteAll(string $className, array $condition)
    {
        $instance = self::getInstance($className);

        return Query::table($className)->selectInstance($instance)->condition($condition)->delete();
    }
844778
public function buildDeleteSQL($table = null)
	{
		$sql = 'delete from ' . $this->parseTable($table) . ' ';
		$where = $this->parseCondition(isset($this->operationOption['where']) ? $this->operationOption['where'] : '');
		if ('' !== $where)
		{
			$where = 'where ' . $where . ' ';
		}
		return $sql
				. $where
				. $this->parseOrder()
				. $this->parseLimit()
				. $this->parseLock()
				;
	}
436572
public function delete(array $criteria = [], array $options = []) {
		return $this->getAdapter()->remove(
			$this->getTableName(),
			$criteria,
			$options
		);
	}
95355
public static function dropTable($table, $ifExists = false, $option = '')
    {
        $query = static::getQuery();

        return static::build(
            'DROP TABLE',
            $ifExists ? 'IF EXISTS' : null,
            $query->quoteName($table),
            $option
        );
    }
1364105
public function delete($options=array()) {
        $this->model  =   $options['model'];
        $this->parseBind(!empty($options['bind'])?$options['bind']:array());
        $sql   = 'DELETE FROM '
            .$this->parseTable($options['table'])
            .$this->parseWhere(!empty($options['where'])?$options['where']:'')
            .$this->parseLock(isset($options['lock'])?$options['lock']:false)
            .$this->parseComment(!empty($options['comment'])?$options['comment']:'');
        return $this->execute($sql,!empty($options['fetch_sql']) ? true : false);
    }
1317240
public function delete($table = null)
    {
        $this->type = self::TYPE_DELETE;
        if ($table) {
            $this->table($table);
        }

        return $this;
    }
530132
public function delete($table, $where = '', $params = [])
    {
        return $this->getDeleteBuilder()
            ->setTable($table)
            ->setWhere($where, $params)
            ->execute();
    }
555146
public function delete($table, $where, $bind = "")
    {
        $sql = "DELETE FROM " . $table . " WHERE " . $where . ";";
        return $this->run($sql, $bind);
    }
1253809
public function delete($table, $where, $whereValue)
    {
        $query = $this->provider->buildDeleteQuery($table, $where, $whereValue);

        return $this->provider->query($query, null);
    }
300894
public static function delete($table, $condition = null)
    {
        $query = array("DELETE FROM $table ");
        array_push($query, (isset($condition))?" WHERE $condition":'');
        return implode($query);
    }
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;
    }
1139385
public function deleteBy($conditions = [])
    {
        if (count($conditions)) {
            if (method_exists($this, 'beforeDelete')) {
                $this->beforeDelete();
            }

            if (method_exists($this, 'beforeDelete')) {
                $this->beforeDelete();
            }

            if ($this->qb->table($this->table)->limit(1)->delete($conditions)) {
                if (method_exists($this, 'afterDelete')) {
                    return $this->afterDelete();
                }

                return $this->db->getAffectedRows();
            }
        }

        return false;
    }