Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-8071

DBAL function "sql_nextid" - name is misleading

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.3.11
    • 3.0.0
    • Other

      This function gets the ID of the last inserted row, not the ID of the next row to be inserted (which is difficult due to different autoincrement steps and also lends itself nicely to race conditions).

      Someone reading the API could be mislead as to what this function does. Perhaps "sql_lastid" or "sql_insertedid" may be better?

            Marc Marc
            jamesmolloy jamesmolloy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: