public function rollback()
    {
        switch ($this->mode) {

            case "mysql":
                $result = $this->server->rollback();
                break;

            case "postgres":
            case "redshift":
                $result = $this->query("ROLLBACK");
                break;

            case "odbc":
                $result = odbc_rollback($this->server);
                break;

            default:
                throw new \Exception("rollback() not supported in this mode (" . $this->mode . ")");
        }

        if (!$result) {
            $this->error();
        }

        return true;
    }
public function rollback()
    {
        switch ($this->mode) {

            case "mysql":
                $result = $this->server->rollback();
                break;

            case "postgres":
            case "redshift":
                $result = $this->query("ROLLBACK");
                break;

            case "odbc":
                $result = odbc_rollback($this->server);
                break;

            default:
                throw new \Exception("rollback() not supported in this mode (" . $this->mode . ")");
        }

        if (!$result) {
            $this->error();
        }

        return true;
    }
public function rollback ( ) { switch ( $ this -> mode ) { case "mysql" : $ result = $ this -> server -> rollback ( ) ; break ; case "postgres" : case "redshift" : $ result = $ this -> query ( "ROLLBACK" ) ; break ; case "odbc" : $ result = odbc_rollback ( $ this -> server ) ; break ; default : throw new \ Exception ( "rollback() not supported in this mode (" . $ this -> mode . ")" ) ; } if ( ! $ result ) { $ this -> error ( ) ; } return true ; }
Rollback queries without ending the transaction
Rollback queries without ending the transaction