public function rollBack()
    {
        // check if transaction is actually started
        if (!$this->inTransaction()) {
            throw new Exception('Using rollBack() when no transaction has started');
        }

        $this->transaction_depth--;

        if ($this->transaction_depth == 0) {
            return $this->connection->rollBack();
        }

        return false;
    }
public function rollBack()
    {
        // check if transaction is actually started
        if (!$this->inTransaction()) {
            throw new Exception('Using rollBack() when no transaction has started');
        }

        $this->transaction_depth--;

        if ($this->transaction_depth == 0) {
            return $this->connection->rollBack();
        }

        return false;
    }
public function rollBack ( ) { // check if transaction is actually started if ( ! $ this -> inTransaction ( ) ) { throw new Exception ( 'Using rollBack() when no transaction has started' ) ; } $ this -> transaction_depth -- ; if ( $ this -> transaction_depth == 0 ) { return $ this -> connection -> rollBack ( ) ; } return false ; }
Rollbacks queries since beginTransaction and resets transaction depth.

@see beginTransaction()

@return mixed Don't rely on any meaningful return
Rollbacks queries since beginTransaction and resets transaction depth .