Uploaded image for project: 'CMS CONTENIDO'
  1. CMS CONTENIDO
  2. CON-1963

getLastInsertedId in class.db.driver.handler.php returns wrong value

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: CONTENIDO 4.9.4
    • Fix Version/s: CONTENIDO 4.9.5
    • Component/s: Core Code
    • Labels:
      None

      Description

      $this->query('SELECT LAST_INSERT_ID() as last_id FROM ' . $tableName);
      if ($this->nextRecord())

      { $lastId = $this->f('last_id'); }

      LAST_INSERT_ID() is a global function that is not related to a specific table.

      Doku: http://dev.mysql.com/doc/refman/5.0/en/information-functions.html#function_last-insert-id

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                frederic.schneider Frederic Schneider
                Reporter:
                claus.schunk claus.schunk
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: