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

DBAL function "sql_nextid" - name is misleading

    XMLWordPrintable

Details

    • Improvement
    • Status: Unverified Fix (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.0.0
    • 3.3.11
    • Other

    Description

      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?

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: