Collecting Data for More Than One INSERT

Here’s another situation where <cfinsert> formfields can be used: when a form collects data that needs to be added to more than one table. You can create a template that has two or more <cfinsert> statements by using formfields.

As long as each <cfinsert> statement has a formfields attribute that specifies which fields are to be used with each INSERT, ColdFusion correctly executes each <cfinsert> with its appropriate fields.

Get Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.