code: public function lastInsertId($name = null)
      {
          $stmt = $this->query('SELECT SCOPE_IDENTITY()');
          $id   = $stmt->fetchColumn();
          $stmt->closeCursor();
          return $id;
      }
docs: {@inheritdoc}