Ok, first of all whats the difference between these two and secondly are they correct for my needs?
I have three tables:
1. stores details of problems logged with one record per problem.
stores details of one or more categories (i.e. email, network, etc.)associated to each problem record.
holds a list of categories, one category per record.
I've got 'sid' as the primary key for the problem table and 'sid' & 'category' in the associated table (no primary).
What I'd like to do is insert the data into the problem table(1), then insert the related categories into the associated table(2). What I cant work out is how to ensure the same ID is consistent for both tables.
I've come accross mysql_insert_id and it seems appropriate for retrieving the ID of the last record inserted. However, there was no example of script, so how do you use it?