Jim Faucette wrote:
> The manual is vague on this point.
> "It will not even be changed if you update another `AUTO_INCREMENT'
> column with a non-magic value (that is, a value that is not `NULL' and
> not 0)."
> Unfortunately the manual is mute on what should happen to LAST_INSERT_ID
> after an INSERT into a NON-AUTO_INCREMENT field. If you want to use the
"Returns the ID that was most recently generated for an AUTO_INCREMENT
field." (220.127.116.11) implies that tables without such fields don't change
> original value to update or insert into more than one table, you
> probably should retain it yourself rather than rely on MySQL.
I'm using (my)SQL LAST_INSERT_ID() for this right now. I'm in need of
mysql_insert_id for logging purposes when my application shuts down, and
thus I want it from the MYSQL struct, and not pass it around all over
the application all the time just to have it at hand later on.
w e b f a c t o r y | matthias pigulla