|
Posted by <talthen.z-serwera.o2 on 08/28/05 18:06
Hello,
I have a table with column ID of auto increment type.
I want to insert a record in the table and then I want to show it's ID.
My best idea is to count the records in the table after inserting the
record.
But if 2 people will insert different records in the same time in the same
table, then
it is possible that they will get wrong ids.
To be sure that the script will always return right id I can write a sql
query that will search the table for record of values same as the ones, that
have been just saved.
But- can I do it easier and faster?
Regards,
Talthen
Navigation:
[Reply to this message]
|