public function start() {
        if ($this->dialect) {
            //允许事务嵌套
            $this->transLevel += 1;
            $dialect          = $this->dialect;
            if ($dialect->inTransaction()) {
                return true;
            }
            $rst = $dialect->beginTransaction();
            if ($rst) {
                return true;
            } else {
                $this->transLevel -= 1;
            }
        }

        return false;
    }
public function start() {
        if ($this->dialect) {
            //允许事务嵌套
            $this->transLevel += 1;
            $dialect          = $this->dialect;
            if ($dialect->inTransaction()) {
                return true;
            }
            $rst = $dialect->beginTransaction();
            if ($rst) {
                return true;
            } else {
                $this->transLevel -= 1;
            }
        }

        return false;
    }
public function start ( ) { if ( $ this -> dialect ) { //允许事务嵌套 $ this -> transLevel += 1 ; $ dialect = $ this -> dialect ; if ( $ dialect -> inTransaction ( ) ) { return true ; } $ rst = $ dialect -> beginTransaction ( ) ; if ( $ rst ) { return true ; } else { $ this -> transLevel -= 1 ; } } return false ; }
start a database transaction

@return boolean
start a database transaction