- ColdFusion 9 Developer Tutorial
- John Farrar
- 173字
- 2021-08-05 16:16:40
Adding a new record
We have seen the update function work. But, we have not seen the working of our insert function yet. We will modify the code so that we can add a new record. We will have to modify the content section of the product_list.cfm
page to complete this function. The previous page is already set up to run:
<!--- Content ---> <cfif url.message NEQ ""> <div> <cfoutput>#url.message#</cfoutput> <hr /> </div> </cfif> <h3>Select a product to edit.</h3> <ul> <li> <a href="product_edit.cfm">+ New Product </li> <cfoutput query="rsProducts"> <li> <a href="product_edit.cfm?id=#rsProducts.id#">#rsProducts.name# </li> </cfoutput> </ul>
Now, let us observe the page again. Once the page is loaded, and we click on refresh, we will see the following page:

Let us click the + New Product link, and observe what we get. We receive a new form to fill in the details. Let us enter some information and see how a new record is being added:

The following screenshot shows the new record:

In the previous screenshot, we can see that the record has been stored. Now, we are able to fully manage our database table by using the editing functions that we have built into our pages.
- Creo Parametric 8.0中文版基礎(chǔ)入門一本通
- 四時風(fēng)月繪:國風(fēng)水墨CG插畫繪畫技法
- 對比Excel,輕松學(xué)習(xí)SQL數(shù)據(jù)分析
- Quickstart Apache Axis2
- AutoCAD 2014實用教程(第4版)
- BlackBerry Enterprise Server 5 Implementation Guide
- Photoshop網(wǎng)店圖片處理實訓(xùn)教程
- Java EE 6 with GlassFish 3 Application Server
- Word-Excel-PowerPoint 2010三合一辦公應(yīng)用實戰(zhàn)從入門到精通(超值版)
- JBoss RichFaces 3.3
- 3D打印輕松實踐:從材料應(yīng)用到三維建模
- 從零開始:Indesign CC 2019設(shè)計基礎(chǔ)+商業(yè)設(shè)計實戰(zhàn)
- 企業(yè)微信公眾平臺開發(fā)實戰(zhàn):再小的個體也有自己的品牌
- Microsoft Dynamics Sure Step 2010
- Illustrator 2022從入門到精通