O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Processing Updates

As with adding data, there are two ways to update rows in a table. The code in Listing 14.10 demonstrates a row update using the SQL UPDATE statement.

See Chapter 6, “Introducing SQL,” for an explanation of the UPDATE statement.
Listing 14.10. update2.cfm—Updating a Table with SQL UPDATE
<!--- Name: update2.cfm Author: Ben Forta (ben@forta.com) Description: Table row update demo Created: 07/01/07 ---> <!--- Update movie ---> <cfquery datasource="ows"> UPDATE Films SET MovieTitle='#Trim(FORM.MovieTitle)#', PitchText='#Trim(FORM.PitchText)#', AmountBudgeted=#FORM.AmountBudgeted#, RatingID=#FORM.RatingID#, Summary='#Trim(FORM.Summary)#', ImageName='#Trim(FORM.ImageName)#', DateInTheaters=#CreateODBCDate(FORM.DateInTheaters)# ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required