Basic HTML version of Foils prepared May 3 1998

Foil 46 Creating an Update Page with CFQUERY

From Java Blend and Cold Fusion High Level Database Interfaces CPS616 Web Technologies -- Spring 98. by Chao Wei Ou


SQL update statement is:
UPDATE tablename SET columnname = value WHERE condition
To update the record with the front end form from the example above using a CFQUERY use this syntax:
<CFQUERY NAME="UpdateEmployee"
DATASOURCE="CF 3.0 Examples">
UPDATE Employees
SET Firstname='#Form.Firstname#',
LastName='#Form.LastName#',
Phone='#Form.Phone#'
WHERE Employee_ID=#Employee_ID#
</CFQUERY>



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sat Nov 28 1998