Hello,
I have the following table structures in MySQL:
Table Name: Header
hdr_id UNSIGNED NOT NULL PRIMARY KEY AUTO INCREMENT
hdr_text VARCHAR(50) NOT NULL
Table Files: Files
file_id UNSIGNED NOT NULL PRIMARY KEY AUTO INCREMENT
file_text VARCHAR(50) NOT NULL
hdr_id int(10) NOT NULL
The user will be greeted with a forum to enter in a header name and an option of up to 5 different text descriptions that will be linked to the header name.
How to I create this insert statement so that it pulls the auto_incremented hdr_id and then links the 5 different descriptions with the hdr_id value in the hdr_id column of the Files table?
Is this even the most efficient way to structure this?
I am familiar with doing single table insert and queries, but I don't have any good documentation on working with multiple tables. I have the New Riders MySQL book and it brushes briefly on just doing multiple table queries.
Any ideas on the best way to tackle this task? Or a good source of documentation on working with multiple tables?
Thanks for the help,
Troy