Delete statement.

@param string $table Table name.
@param array $where Dict of WHERE to delete.
354423
final public function delete($table, $where=[]) {
		$stmt = "DELETE FROM $table";
		if ($where) {
			$pair_wheres = [];
			$params = [];
			foreach ($where as $key => $val) {
				$pair_wheres[] = "{$key}=?";
				$params[] = $val;
			}
			$stmt .= " WHERE " . implode(" AND ", $pair_wheres);
		}

		self::$logger->info(sprintf(
			"SQL: delete ok: %s <- '%s'.",
			$stmt, json_encode($where)));

		$this->prepare_statement($stmt, $params);
	}
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);
    }
174373
protected function _delete($where)
    {
        $params = array();
        $query = "DELETE FROM $this->_name";

        $iWhere = 0;
        $query .= " WHERE (";
        foreach ($where as $key => $value) {
            if (!is_int($key)) {
                $query .= "$key = :where$iWhere AND ";
                $params[":where$iWhere"] = $value;
                $iWhere++;
            } else {
                $query .= "$value AND";
            }
        }
        $query = substr($query, 0, -4);
        $query .= ")";

        $db = $this->db;
        $sth = $db->prepare($query);

        foreach ($params as $key => $val) {
            if (is_int($val)) {
                $sth->bindValue("$key", $val, $db::PARAM_INT);
            } else {
                $sth->bindValue("$key", $val);
            }
        }

        $response = $sth->execute();

        if ($response) {

            return true;
        }

        return false;
    }
178019
public function destroyBy(array $where)
    {
        $query = $this->make();

        $query = $this->applyWhere($query, $where);

        return $query->delete();
    }
1174579
@CheckResult protected Observable<Integer> delete(@NonNull final String table,
      @Nullable final String whereClause, @Nullable final String... whereArgs) {
    return Observable.defer(new Func0<Observable<Integer>>() {
      @Override
      public Observable<Integer> call() {
        return Observable.just(db.delete(table, whereClause, whereArgs));
      }
    });
  }
1230807
public function delete(array $where, $tableName = null)
    {
        $tableName = $tableName ?: $this->getTableName();
        $sql = $this->getSql();
        $delete = $sql->delete($tableName);

        $delete->where($where);

        $statement = $sql->prepareStatementForSqlObject($delete);

        return $statement->execute();
    }
772359
public function delete($table, $condition = [], array $options = [])
    {
        $query = $this->createQuery('delete', $table, $options)->where($condition);

        return $this->createRequest($query);
    }
927541
public function deleteWhere(array $wheres)
    {
        $query = $this->getSqlObject()
            ->delete()
            ->where($wheres);

        return $this->execute($query);
    }
312603
public function delete($table, array $where, $limit=0)
	{
        $tmp = array();

		$sql = "DELETE FROM {$table} WHERE " . $this->buildWhere($where, $tmp);

		if ($limit) {
			$sql .= " LIMIT ".(int)$limit;
		}

        $stmt = $this->prepare($sql);
        return $stmt ? $stmt->execute($tmp) : false;
	}
782124
public function delete($where) {
        $this->notifyObservers('beforeDelete', array($this, &$where));
        $result = parent::delete($where);
        $this->notifyObservers('afterDelete', array($this, $result, $where));
        return $result;
    }
740650
protected function prepareDelete($table, $where){
        $sql= 'DELETE FROM ' . $table . ' ';            
        if($where != ''){$sql.= " WHERE " . $where;}
        //Preparo la consulta y la retorno
        return  $this->connection->prepare($sql);
    }
1222043
public function delete($table, array $conditions = [])
    {
        $query = $this->db->getQuery(true);

        // Conditions.
        QueryHelper::buildWheres($query, $conditions);

        $query->delete($query->quoteName($table));

        $this->db->setQuery($query)->execute();

        return true;
    }
321132
def delete(self, table, where=None):
        """"""
        if where:
            where_key, where_val = where
            query = "DELETE FROM {0} WHERE {1}='{2}'".format(wrap(table), where_key, where_val)
        else:
            query = 'DELETE FROM {0}'.format(wrap(table))
        self.execute(query)
        return True
153452
public function delete($table, $where = null): array
    {
        $map = [];
        if (\is_array($table)) {
            $where = $table;
            $table = $this->getTable($table, SQL::DELETE);
        } elseif ($where) {
            $where = [SQL::WHERE => $where];
        }

        $sql = 'DELETE FROM ' . $this->tableQuote($table) . $this->suffixClause($where, $map);

        return [$sql, $map];
    }
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();
    }
681213
public function createDelete(string $tableName, string $where): string
    {
        // 构造 删除语句
        $sql = "DELETE " . "FROM " . $tableName . ' ' . $where;
        return $sql;
    }
148297
public function delete($table, $conditions, $bind = [])
    {
        if (is_string($conditions)) {
            $conditions = [$conditions];
        }

        $wheres = [];
        /** @noinspection ForeachSourceInspection */
        foreach ($conditions as $k => $v) {
            if (is_int($k)) {
                $wheres[] = stripos($v, ' or ') ? "($v)" : $v;
            } else {
                $wheres[] = "[$k]=:$k";
                $bind[$k] = $v;
            }
        }

        $sql = 'DELETE' . ' FROM ' . $this->_escapeIdentifier($table) . ' WHERE ' . implode(' AND ', $wheres);
        return $this->_execute('delete', $sql, $bind);
    }