returns the transaction sequence for the next transaction.

@return int
199907
protected function getNextTransactionSequenceNumber()
    {
        $query = "SELECT MAX(sequence_number) AS max_sequence_number
                    FROM `pkg_shop_payment_transaction`
                   WHERE `pkg_shop_payment_transaction`.`shop_order_id` = '".MySqlLegacySupport::getInstance(
            )->real_escape_string(
                $this->order->id
            )."'
                GROUP BY `pkg_shop_payment_transaction`.`shop_order_id`
                 ";
        if ($aSum = MySqlLegacySupport::getInstance()->fetch_assoc(MySqlLegacySupport::getInstance()->query($query))) {
            $iSequenceNumber = $aSum['max_sequence_number'] + 1;
        } else {
            $iSequenceNumber = 1;
        }

        return $iSequenceNumber;
    }
1113726
public function getNext() {
		$nextPrompt = array();
		$prompts = $this->getPrompts();

		foreach ( $prompts as $prompt ) {
			$isDismissed      = isset( $prompt['time_dismissed'] );
			$isOlder          = empty( $nextPrompt ) || ( ! $isDismissed && $prompt['time_added'] < $nextPrompt['time_added'] );
			$isStillSnoozing  = ! empty( $prompt['time_snoozed_until'] ) && $prompt['time_snoozed_until'] > time();

			if ( ! $isDismissed && $isOlder && ! $isStillSnoozing ) {
				$nextPrompt = $prompt;
			}
		}

		if ( ! $this->isMinInterval() ) {
			$nextPrompt = array();
		}

		return $nextPrompt;
	}
1070574
public function getSequenceNumber()
    {
        foreach ($this->thread->posts as $index => $post) {
            if ($post->id == $this->id) {
                return $index + 1;
            }
        }
    }
67974
protected function next()
    {
        $promiseOrValue = array_shift($this->queue);
        $promise = resolve($promiseOrValue);
        $this->cancellationQueue->enqueue($promise);
        return $promise;
    }
839635
protected function transactionSucceed()
	{
		return $this->getTable()->whereId($this->transactionId)->update([
			'status' => Enum::TRANSACTION_SUCCEED,
			'tracking_code' => $this->trackingCode,
			'card_number' => $this->cardNumber,
			'payment_date' => Carbon::now(),
			'updated_at' => Carbon::now(),
		]);
	}
154821
protected function parseTransactionDebitCredit()
    {
        $results = [];
        if (preg_match(self::PATTERN_TAG_61, $this->getCurrentTransactionData(), $results)) {
            return $this->sanitizeDebitCredit($results[3]);
        }

        return '';
    }
1254360
public function next()
    {
        $this->queryHasBegun = true;
        $this->currentRecord = $this->nextRecord();
        $this->rowNum++;
        return $this->currentRecord;
    }
652194
public function rollbackTransaction()
    {
        $this->db_connect('w', true);

        // check connection before proceeding
        if (!$this->is_connected()) {
            return $this->last_result = false;
        }

        $this->debug('ROLLBACK TRANSACTION');

        if (@oci_rollback($this->dbh)) {
            $this->in_transaction = false;
        }
        else {
            $this->handle_error('ROLLBACK');
        }

        return $this->last_result = $this->dbh->rollBack();
    }
4724
public function next() {
		if ($this->_buffer) {
			list($this->_key, $this->_current) = array_shift($this->_buffer);
			return $this->_current;
		}

		if (!$next = $this->_fetch()) {
			$this->_key = null;
			$this->_current = null;
			$this->_valid = false;

			return null;
		} else {
			list($this->_key, $this->_current) = $next;
			$this->_valid = true;
		}
		return $this->_current;
	}
1267509
public function getTransactionReference()
    {
        if (isset($this->data['object']) && 'charge' === $this->data['object']) {
            return $this->data['id'];
        }
        if (isset($this->data['error']) && isset($this->data['error']['charge'])) {
            return $this->data['error']['charge'];
        }

        return null;
    }
896988
public function getNextTableBehavior()
    {
        // order the behaviors according to Behavior::$tableModificationOrder
        $behaviors = [];
        $nextBehavior = null;
        foreach ($this->tables as $table) {
            foreach ($table->getBehaviors() as $behavior) {
                if (!$behavior->isTableModified()) {
                    $behaviors[$behavior->getTableModificationOrder()][] = $behavior;
                }
            }
        }
        ksort($behaviors);
        if (count($behaviors)) {
            $nextBehavior = $behaviors[key($behaviors)][0];
        }

        return $nextBehavior;
    }
744253
public static function getTransactionName()
    {
        if (self::$trace['tx'] === 'default' && self::$extension === self::EXTENSION_TIDEWAYS) {
            return tideways_transaction_name() ?: 'default';
        }

        return self::$trace['tx'];
    }
1163988
public function getNextId()
    {
        $sql   = 'UPDATE ' . $this->table . ' SET value = LAST_INSERT_ID(value + 1) WHERE name = ?';

        $result   = $this->db->query($sql, array($this->name));
        $rowCount = $result->rowCount();

        if (1 !== $rowCount) {
            throw new Exception("Sequence '" . $this->name . "' not found.");
        }

        $createdId = $this->db->lastInsertId();

        return (int) $createdId;
    }
546221
public function getNext()
    {
        reset($this->groups);
        while ($key = key($this->groups)) {
            $nextGroup = next($this->groups);

            if ($this->groups[$key] === $this->group && $nextGroup) {
                return $nextGroup;
            }
        }

        return $this->group;
    }
790210
protected function transactionStart() {
		if ( $this->transactionCounter == 0 ) {
			$this->transactionCounter++;
			return $this->dbh->beginTransaction();
		}
		$this->transactionCounter++;
		return $this->transactionCounter >= 0;
	}
1019183
protected function getSequence()
    {
        return $this->getRequest()->args('version') || $this->getRequest()->args('release')
            ? ($this->getRequest()->args('release') === null
                ? ''
                : $this->getRequest()->args('release'))
            : $this->modx->version['full_version'];
    }
363530
public function commitTransaction() {
        $this->_fireEvent('phpsweetpdo.commit_transaction.started', array ());
        $result = $this->_pdoObject->commit();
        $this->_fireEvent('phpsweetpdo.commit_transaction.finished', array ('result' => &$result));

        return $result;
    }