src/DB/Drivers/PDOSqlDriver.php
public function stmt($execute = true, $prepare_params = array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY))
    {
        if ($this->qid == 0) {
            throw new CoreException("链式风格的查询必须以->select()开始");
        }

        $this->sql = &$this->querySQL[$this->qid];
        try {
            $stmt = $this->pdo->prepare($this->sql, $prepare_params);
            if ($execute) {
                $execute_params = $this->queryParams[$this->qid];
                $stmt->execute($execute_params);
            }

            unset($this->querySQL[$this->qid], $this->queryParams[$this->qid]);
            return $stmt;
        } catch (Exception $e) {
            throw new CoreException($e->getMessage());
        }
    }
public function stmt($execute = true, $prepare_params = array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY))
    {
        if ($this->qid == 0) {
            throw new CoreException("链式风格的查询必须以->select()开始");
        }

        $this->sql = &$this->querySQL[$this->qid];
        try {
            $stmt = $this->pdo->prepare($this->sql, $prepare_params);
            if ($execute) {
                $execute_params = $this->queryParams[$this->qid];
                $stmt->execute($execute_params);
            }

            unset($this->querySQL[$this->qid], $this->queryParams[$this->qid]);
            return $stmt;
        } catch (Exception $e) {
            throw new CoreException($e->getMessage());
        }
    }
绑定链式查询生成的sql语句并返回stmt对象

@param bool $execute 是否调用stmt的execute
@param array $prepare_params prepare时的参数
@return PDOStatement
@throws CoreException