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

<cfupdate> vs. SQL UPDATE

As with adding data, the choice to use <cfupdate> or SQL UPDATE is yours. The following guidelines as to when to use each option are similar as well:

  • Whenever appropriate, use <cfupdate> to update data.

  • If you find you need to update specific form fields—not all that were submitted—use the <cfupdate> tag with the formfields attribute.

  • If <cfupdate> can’t be used because you need a complex UPDATE statement or you are using fields that aren’t form fields, use SQL UPDATE.

  • If you ever need to update multiple (or all) rows in a table, you must use SQL UPDATE.

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