src/DB/Drivers/PDOSqlDriver.php
public function del($table, $where, $multi = false, $openTA = false)
    {
        $del_count = 0;
        $this->SQLAssembler->del($table, $where, $multi);
        $this->sql = $this->SQLAssembler->getSQL();
        $this->params = $this->SQLAssembler->getParams();
        if ($multi) {
            if ($openTA) {
                $this->beginTA();
                try {
                    if (!empty($this->params)) {
                        $stmt = $this->prepare($this->sql);
                        foreach ($this->params as $p) {
                            $del_count += $stmt->exec($p, true);
                        }
                    }
                } catch (Exception $e) {
                    $this->rollBack();
                    throw new CoreException($e->getMessage());
                }
                $this->commit();
            } else {
                if (!empty($this->params)) {
                    $stmt = $this->prepare($this->sql);
                    foreach ($this->params as $p) {
                        $del_count += $stmt->exec($p, true);
                    }
                }
            }
        } else {
            $del_count = $this->prepare($this->sql)->exec($this->params, true);
        }

        return $del_count;
    }
public function del($table, $where, $multi = false, $openTA = false)
    {
        $del_count = 0;
        $this->SQLAssembler->del($table, $where, $multi);
        $this->sql = $this->SQLAssembler->getSQL();
        $this->params = $this->SQLAssembler->getParams();
        if ($multi) {
            if ($openTA) {
                $this->beginTA();
                try {
                    if (!empty($this->params)) {
                        $stmt = $this->prepare($this->sql);
                        foreach ($this->params as $p) {
                            $del_count += $stmt->exec($p, true);
                        }
                    }
                } catch (Exception $e) {
                    $this->rollBack();
                    throw new CoreException($e->getMessage());
                }
                $this->commit();
            } else {
                if (!empty($this->params)) {
                    $stmt = $this->prepare($this->sql);
                    foreach ($this->params as $p) {
                        $del_count += $stmt->exec($p, true);
                    }
                }
            }
        } else {
            $del_count = $this->prepare($this->sql)->exec($this->params, true);
        }

        return $del_count;
    }
删除

@see SQLAssembler::del()
@param string $table
@param string|array $where
@param bool $multi 是否批量删除数据
@param bool $openTA 是否开启事务
@return bool
@throws CoreException