altctrldel
Technical User
- Jul 26, 2003
- 30
Well this is what I intend to do;
once the php scipt has succesfully updated the database from the user input, i need it to automatically retreive the primary key (id number which increments using the database ang not php) which it has been assigned to and then store it in the session for later use.
so does it go like:
step 1: update
step 2: select the end of the database row and get the id info? (but what if there are 2 or more users who have inputted data almost at the same time?
for example:
9pm: User 1 inputs info A which is assigned an id of A1
9pm: User 2 inputs info B which is assigned an id of B1
So the last row would be B1, user A would take down user 2's id numberB1) which is not good.
thank you for replying.
once the php scipt has succesfully updated the database from the user input, i need it to automatically retreive the primary key (id number which increments using the database ang not php) which it has been assigned to and then store it in the session for later use.
so does it go like:
step 1: update
step 2: select the end of the database row and get the id info? (but what if there are 2 or more users who have inputted data almost at the same time?
for example:
9pm: User 1 inputs info A which is assigned an id of A1
9pm: User 2 inputs info B which is assigned an id of B1
So the last row would be B1, user A would take down user 2's id numberB1) which is not good.
thank you for replying.