> use mysql_insert_id(). Much more reliable when and if you use the
system
> with more than one person inserting at the same time.
Sure it's for that I ask
Thanks for your help.
Christian,
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
>Insert and recover the ID
Hello,
In a table, I have some fields and the primary key is an autoincrement
field. I insert an row and I'd like to recover the ID used for the last
record I inserted.
For the moment, I do a select max(Id) just after the insert but there
is, my be a best way
> In a table, I have some fields and the primary key is an autoincrement
> field. I insert an row and I'd like to recover the ID used for the last
> record I inserted.
>
> For the moment, I do a select max(Id) just after the insert but there
> is, my be a best way to do it.
Stop.
Read this:
www
Check out mysql_insert_id()
> For the moment, I do a select max(Id) just after the insert but there
> is, my be a best way to do it.
--
Linux: Because rebooting is for adding hardware.
Fingerprint = CE24 057D 1E88 A253 3196 89DB 9FF0 9EF0 2F70 8BE8 BE8
signature.asc
Description: This is a digi
Hello,
In a table, I have some fields and the primary key is an autoincrement
field. I insert an row and I'd like to recover the ID used for the last
record I inserted.
For the moment, I do a select max(Id) just after the insert but there
is, my be a best way to do it.
Thanks for your help
Chri
5 matches
Mail list logo