QuerySetCell() - set a cell to a value in a query object
QuerySetCell.cfm
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>QuerySetCell function example: how to set a cell to a value in a query object</title>
</head>
<body>
<h2 style="color:HotPink">QuerySetCell Function Example</h2>
<cfset qColor=QueryNew("ColorID, ColorName, ColorValue","Integer, VarChar, VarChar")>
<cfset Temp=QueryAddRow(qColor,2)>
<cfset Temp=QuerySetCell(qColor,"ColorID",1,1)>
<cfset Temp=QuerySetCell(qColor,"ColorName","Beige",1)>
<cfset Temp=QuerySetCell(qColor,"ColorValue","##F5F5DC",1)>
<cfset Temp=QuerySetCell(qColor,"ColorID",2,2)>
<cfset Temp=QuerySetCell(qColor,"ColorName","Bisque",2)>
<cfset Temp=QuerySetCell(qColor,"ColorValue","##FFE4C4",2)>
<cfdump var="#qColor#" label="qColor">
</body>
</html>
- QueryAddColumn() - add a column to a query with its value
- QueryAddRow() - add a specified number of empty rows to a query
- QueryNew() - create an empty query (query object)
- QuotedValueList() - get a delimited List from an executed query
- cfdump - dump query
- cfquery - delete data
- cfquery - insert data
- cfquery - update data
- cfquery - RecordCount