| Contents > CFML Reference > ColdFusion Functions > QueryAddRow |
|
|
|
|
||
Adds a specified number of empty rows to a query.
The number of rows in the query
QueryAddRow(query [, number ])
QueryAddColumn, QueryAddRow, QuerySetCell, QueryNew
Parameter |
Description |
|---|---|
query |
Name of an executed query. |
number |
Number of rows to add to the query. Default: 1. |
<h3>QueryAddRow Example</h3> <!--- start by making a query ---> <cfquery name = "GetCourses" datasource = "cfsnippets"> SELECT Course_ID, Descript FROM Courses </cfquery> <p>The Query "GetCourses" has <cfoutput>#GetCourses.RecordCount#</cfoutput> rows. <cfset CountVar = 0> <cfloop CONDITION = "CountVar LT 15"> <cfset temp = QueryAddRow(GetCourses)> <cfset CountVar = CountVar + 1> <cfset Temp = QuerySetCell(GetCourses, "Number", 100*CountVar)> <cfset CountVar = CountVar + 1> <cfset Temp = QuerySetCell(GetCourses, "Descript",
"Description of variable #Countvar#")> </cfloop> <P>After the QueryAddRow action, the query has <CFOUTPUT>#GetCourses.RecordCount#</CFOUTPUT> records. <CFOUTPUT query="GetCourses"> <PRE>#Course_ID# #Course_Number# #Descript#</pre> </cfoutput>
|
|
||
| Contents > CFML Reference > ColdFusion Functions > QueryAddRow |
|
|
ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6.1
Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/functa56.htm
Comments
smaglio said on Nov 4, 2004 at 5:09 PM :