• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

What's Next

In this chapter, you moved beyond the SQL SELECT query and saw how you could implement INSERT, UPDATE, and DELETE queries using the <cfquery> tag. You learned that inserting records is a two-step process: gathering information for the new record through an HTML form and then creating a new record from this data by creating an INSERT query with either <cfquery> or <cfinsert>. You saw that editing existing records is a three-step process: allowing the user to choose a record to edit; presenting the information in the selected record through an HTML form; and then performing an UPDATE query, using either <cfquery> or <cfupdate>, to commit the changes to the database. You learned that deleting a record is a two-step process: allowing the user to choose a record to delete and then performing a DELETE query using the <cfquery> tag to eliminate the record. Finally, you saw how to implement logical deletes in your application and how you would have to change your queries in the insert, edit, and delete processes to work with logically deleted records.

In your experience with ColdFusion so far, you have been using variables that are fairly simple in nature. You have used variables that you created yourself through the <cfset> tag; Form and URL variables, whose values are determined by form and query string data, respectively; and query variables, which contain data retrieved from a relational database. All these variable types are important in ColdFusion work, but you can use other, more complex variable types as well. These types include lists, arrays, and structures, and all three will be discussed in the next chapter.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint