The only way I could think of doing this is converting your columns to
arrays, inserting the new row and recreating your query again using the new
arrays
sorta like this
not tested though
<cfloop list="#query.ColumnList#" index="i">
<cfscript>
// Convert column into array
"#i#" = ListToArray(ValueList(Query[i]));
// Insert new array item
"#i#" = ArrayInsertAt(Evaluate(i),position,"");
// Create a dummy query
if (NOT isDefined("tempQuery")
{tempQuery = QueryNew("");}
// Add the column with the new row
queryAddColumn(tempQuery,i,i);
// Copy the query into the old query name
if (ListLast(query.ColumList) eq i)
{query = tempQuery;}
</cfscript>
</cfloop>
Regards
Steve Onnis
Domain Concept Designs
+61 422 337 685
+61 3 9444 7504
http://www.domainconceptdesigns.com <http://www.domainconceptdesigns.com>
("If you think it can't be done, you haven't asked me!") - Steve Onnis
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Phil
Rasmussen
Sent: Wednesday, March 05, 2003 1:01 PM
To: CFAussie Mailing List
Subject: [cfaussie] Adding a new row to a query at a certain pointer?
I am praying that this is possible.....can you add a new row to an existing
query an a certain pointer?
Ie I have a query that returns data for a 7 day period for a graph, however
if there is no data for one of the days, then only 6 records are returned. I
want to create an empty row if this is the case, so that the graph still
shows the days in the correct order woth any blank days included as well. So
what I am really asking is can you do a QueryAddRow(myQuery, 1) at a certain
position within the query...ie between rows 4 and 5?
Thanks,
Phil
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MX Downunder AsiaPac DevCon - http://mxdu.com/