Remove valores de uma tabela no banco de dados

@param  string $column coluna da tabela
@param  string $value  valor na tabela
@return boolean         se todos os valores foram deletados com sucesso
651
public static function delete($column, $value)
    {
        try {

            self::instance();

            $tableStatic = static::$table;
            
            $stmt        = self::$db->prepare("delete from {$tableStatic} where {$column} = :value");
            
            $stmt->bindValue(":value", $value);

            $stmt->execute();
            

            if ($stmt->rowCount() == 1) {
                return true;
            }

        } catch (PDOException $e) {

            $error = new Error();
            $error->errorMessage("Error: não foi possível deletar o dado. Verifique se os dados estão corretos. ".$e->getMessage());

        }
    }
563562
protected function one($model, $column, $value)
    {
        $object = $model::where($column, '=', $value);

        if (!is_null($object)) {
            if (count($object) > 0) {
                return $object[0];
            }
        }
    }
218335
function delete($value) {
        $key = \array_search($value, $this->data, true);
        if($key !== false) {
            unset($this->data[$key]);
        }
        
        return $this;
    }
707084
public function setSerialized($column, $value)
  {
    unset($this->serialized[$column]);

    return $this->set($column, !empty($value) ? serialize($value) : null);
  }
362922
protected function removeValuesFromEntry(array $entry, $values)
    {
        foreach ($values as $value) {
            if (isset($entry[$value])) {
                unset($entry[$value]);
            }
        }

        return $entry;
    }
1347748
public function equals($column, $value, $filter = false)
    {
        return $this->compare($column, '=', $value, $filter);
    }
859502
protected function cleanUpValue( $value ) {
		$cleanValue = [];
		if ( !is_array( $value ) ) {
			return $cleanValue;
		}
		foreach ( $value as $singleValue ) {
			$singleValue = parent::cleanUpValue( $singleValue );
			// Remove options that we don't have here
			if ( !isset( $this->fields[ $singleValue ] ) ) {
				continue;
			}
			$cleanValue[] = $singleValue;
		}
		return $cleanValue;
	}
1013750
public function removeColumn($column)
    {
        foreach ($this->getCellList() as $coord) {
            sscanf($coord, '%[A-Z]%d', $c, $r);
            if ($c == $column) {
                $this->deleteCacheData($coord);
            }
        }
    }
78136
public function whereEqualsOrGreaterThan($column, $value, $filter = false)
    {
        return $this->where($column, '>=', $value, $filter);
    }
595622
public function findBy($column, $value, array $columns = ['*'])
    {
        return $this->where([$column => $value], '=', null, 'and', $columns)->first();
    }
225282
public function removeByValue($value): bool {
        if (!$this->containsValue($value)) {
            return true;
        }
        $key = $this->indexOf($value);
        $removed = $this->remove($key);
        return $removed;
    }
289060
public static function dropDown($column, $value = null)
    {
        $dropDownList = [
            "status" => [
                Authentication::STATUS_PENDING => Yii::t('authentication', 'Pending review'),
                Authentication::STATUS_REJECTED => Yii::t('authentication', 'Rejected'),
                Authentication::STATUS_AUTHENTICATED => Yii::t('authentication', 'Authenticated'),
            ],
        ];
        //根据具体值显示对应的值
        if ($value !== null) {
            return array_key_exists($column, $dropDownList) ? $dropDownList[$column][$value] : false;
        } else {//返回关联数组，用户下拉的filter实现
            return array_key_exists($column, $dropDownList) ? $dropDownList[$column] : false;
        }
    }
146116
public function remove($value)
    {
        foreach ($this->values as $i => $v) {
            if ($value == $v) {
                unset($this->values[$i]);
                break;
            }
        }
        $this->stateChanged();
    }
940750
public function dropColumn($column, $table = null)
    {
        return $this->db->alterTable($this->getTable($table))
                        ->dropColumn($column)
                        ->execute();
    }
388137
public function delete($value)
    {
        $index = $this->index($value);

        if ($index !== false) {
            $this->remove($index);
        }

        return $this;
    }
965321
protected function removeExistingOrdersFor($column)
    {
        return Collection::make($this->orders)
                    ->reject(function ($order) use ($column) {
                        return isset($order['column'])
                               ? $order['column'] === $column : false;
                    })->values()->all();
    }
890274
public function whereEqualsOrLessThan($column, $value, $filter = false)
    {
        return $this->where($column, '<=', $value, $filter);
    }