Hi everyone
this is no doubt really simple but here goes:
I have a table of announcements, sometimes but not always people will post a file with the announcement which will go into the documents table. On the occasions when someone does upload a document I would like to retreive the primary key (which is auto incrementing) from the announcements table when the insert had taken place and store it in the documents table with the information on the associated document. This way should someone delete the annoucement i can identify the associated document record and delete that also.
can anyone tell me if there is a way of getting the primary key of a record as you are inserting that record?
Hope that is clear, thanks in advance.