Link to home
Start Free TrialLog in
Avatar of davidcowler
davidcowlerFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Add new SQL record, then retrieve that record's index, for further update, in PHP

Hi

I have a table in a SQL Express database which has an incrementing index field.
What I need to do is to add a new record, but get that record's unique incremented index so that I can display this number, then write subsequent updates to the same record. I need to make sure the 'last record added' that the information comes from is for the particular user and not just the last record on the database, as this may be different - for example if multiple users are adding multiple records at around the same time.

I am using PHP with MS SQL Express 2008.

How would I achieve this?

Thanks
Dave
ASKER CERTIFIED SOLUTION
Avatar of Ross Turner
Ross Turner
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of davidcowler

ASKER

Super :)