return of a field value (auto-increment) after insert (mysql)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rjames.clarke@gmail.com

    return of a field value (auto-increment) after insert (mysql)

    I am inserting a record in to a mysql database. I'd like to know the
    record number of that record.
    I use a index field which is auto-incremented.

    Is there any way to get a field value returned after insertion?

    I have been just running another query for the last record, but if
    someone does insertion a split second after the first insertion the
    last record would not be the one of interest.

    thanks
    bobc

  • Michael Fesser

    #2
    Re: return of a field value (auto-increment) after insert (mysql)

    ..oO(rjames.cla rke@gmail.com)
    >I am inserting a record in to a mysql database. I'd like to know the
    >record number of that record.
    >I use a index field which is auto-incremented.
    >
    >Is there any way to get a field value returned after insertion?


    Micha

    Comment

    Working...