Link to home
Start Free TrialLog in
Avatar of davlin2
davlin2

asked on

How do you create a new record in two tables where the information is linked from a single form

I am new to cold fusion and using cfmx. The data structure is company information in one table and addresses in another. I want to be able to input a new company with addresses from one form.
Avatar of siva350
siva350

Do you have some sort of ID field relating the two tables? if so you could write two insert statements the first one would populate the first table Then I would query that table to get the relating id number and insert the rest of the data including the relating id ito table two. THis will make it easy to refrense the related info by filtering by id in your where statement.

Hope that helps
ASKER CERTIFIED SOLUTION
Avatar of EdgeHelpdesk
EdgeHelpdesk

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