> You need the following three cf functions, the livedocs should tell
> you all you need to know about them:
> 
> QueryNew()
> QueryAddRow()
> QuerySetCell()

Usually yeah, although occasionally for small queries, this is a little
cleaner: 

QueryNew() 
QueryAddColumn() 
ListToArray() - sort of optional 

<cfscript>
  qry = QueryNew(""); 
  QueryAddColumn(qry,"c1",ListToArray("1,2,3")); 
  QueryAddColumn(qry,"c2",ListToArray("a,b,c")); 
  QueryAddColumn(qry,"c3",ListToArray("x,y,z")); 
</cfscript>

just for comparison, the more common approach for the same query would
look like this: 

<cfscript>
qry = QueryNew("c1,c2,c3"); 
QueryAddRow(qry,3); 

QuerySetCell("c1",1,1); 
QuerySetCell("c2","a",1); 
QuerySetCell("c3","x",1); 

QuerySetCell("c1",2,2); 
QuerySetCell("c2","b",2); 
QuerySetCell("c3","y",2); 

QuerySetCell("c1",3,3); 
QuerySetCell("c2","c",3); 
QuerySetCell("c3","z",3); 
</cfscript>

hth,
ike

-- 
s. isaac dealey  ^  new epoch
 isn't it time for a change? 
     ph: 503.236.3691

http://onTap.riaforge.org/blog



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:297958
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to