ColdFusion
  Home arrow ColdFusion arrow Page 3 - Cold Fusion Administration Module
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
COLDFUSION

Cold Fusion Administration Module
By: Tim Haight
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 4
    2004-03-03

    Table of Contents:
  • Cold Fusion Administration Module
  • The Code for Administer.cfm
  • Updating the Record

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Cold Fusion Administration Module - Updating the Record


    (Page 3 of 3 )

    After the record is changed, you can click the Update Record button, a select button with the value of Update Record.

    Cold

    In this example, the Address field has been updated. Here is the source code for updateuser.cfm. 

    In this template, the update to the table is made by the update query in the [CFQUERY] tag. 


    <!---updateuser.cfm-> 
    <cfset txtTitle="User Updated">
     
    <
    cfinclude template="head.txt">
     
    <
    CFQUERY DATASOURCE="mydb" name="qUpdateUser"
     UPDATE Users 
      SET Users
    .password '#form.password#'
          Users
    .lastname '#form.lastname#'
          Users
    .firstname '#form.firstname#'
          Users
    .address '#form.address#'
          Users
    .city '#form.city#'
          Users
    .state '#form.state#'
          Users
    .zipcode '#form.zipcode#'
          Users
    .phone '#form.phone#'
          Users
    .email '#form.email#'
          Users
    .rights '#form.rights#'    
       WHERE Users
    .userid #form.userid# 
    </CFQUERY>
     
    <br>Record Updated<br>
     
    <
    cfinclude template="userinclude.cfm">
     
    <
    cfinclude template="footer.txt">

    After the update is processed, a message is displayed. I also included the userinclude.cfm so that you could update another record.

    Cold Fusion

    Conclusion

    Creating a module to update records utilizes update queries, as well as selecting records using a URL parameter. A search box could also be utilized to search for the records. These techniques could be used anytime there is a need to search for and update a record from a browser.

     


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

     

    COLDFUSION ARTICLES

    - How to Access a SQL Anywhere Database with C...
    - CFXML: Probing XMLDOM in ColdFusion
    - Creating a Web Service with ColdFusion: the ...
    - CFAjax: What it is and How to Use it
    - Querying SQL 2000 Server from ColdFusion
    - Introduction to ColdFusion Markup Language, ...
    - Introduction to ColdFusion Markup Language
    - Databases and Dreamweaver MX 2004, concluded
    - Databases and Dreamweaver MX 2004
    - Welcome to Coldfusion MX 6.1, concluded
    - Welcome to Coldfusion MX 6.1
    - What You Must Know About ColdFusion Flow-Con...
    - What You Must Know About Operators in ColdFu...
    - Everything You Must Know About ColdFusion Va...
    - My First Application on ColdFusion MX Server






    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
    Stay green...Green IT