- 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.
- EJB 3.0 Database Persistence with Oracle Fusion Middleware 11g: LITE
- HTML5 Multimedia Development Cookbook
- 剪映專業(yè)版(電腦版)視頻剪輯全攻略:音效添加+轉(zhuǎn)場特效+視頻制作
- 中文版CorelDRAW基礎(chǔ)培訓(xùn)教程
- Web 2.0 Solutions with Oracle WebCenter 11g
- 從零開始:Photoshop工具詳解與實(shí)戰(zhàn)
- SolidWorks 2018快速入門及應(yīng)用技巧
- 中文版Maya 2016實(shí)用教程
- RAW 數(shù)碼底片演義
- 三維建模與3D打印從入門到精通
- Linux Shell Scripting Cookbook
- 中文版UG NX 7.0基礎(chǔ)教程
- Origin 2022科學(xué)繪圖與數(shù)據(jù)分析(高級應(yīng)用篇)
- Cinema 4D/After Effects印象 影視包裝技法精解基礎(chǔ)篇
- Flash with Drupal