Introducing <CFINSERT> and <CFUPDATE>

You'll need to understand two new ColdFusion tags to create the new pages, <CFINSERT> and <CFUPDATE>. Both are used when you want to change the information in a database. Both work like SQL queries in reverse—instead of selecting information from a database table, these tags change or add values to the fields you specify.

Use <CFINSERT> when you need to add a new record to an existing table. It doesn't require any qualifying statements to do its work. It simply takes the variables you've defined, matches them with field names in your table, and inputs the lot as a new record.

<CFUPDATE> is used to update an existing record in the table. It requires some sort of match to work—that is, you first need to inform ...

Get Sams Teach Yourself ColdFusion® in 21 Days 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.