Jeremy,

Charlies suggestion will work if you want all ids from the
Query as a list.. if you were doing some sort of conditional
Logic and needed to use the listAppend() function..

<cfset NewList = ''>
<cfloop query="CChanges">
        <cfset NewList = ListAppend(NewList,CChanges.CID)>
        <cfoutput>#NewList#</cfoutput>
</cfloop>

You need to append to NewList not the IDs variable.

Cheers,
Adam

-----Original Message-----
From: Charlie Arehart [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 3 May 2006 12:58 PM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Post Long weekend brain fart


Jeremy, if I'm understanding you, you could replace the loop with this:

<cfset IDs = valuelist(CChanges.CID)>

Does that work for you?

/charlie

-----Original Message-----
From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On
Behalf
Of <cfgroupie>
Sent: Monday, May 01, 2006 9:31 PM
To: cfaussie
Subject: [cfaussie] Post Long weekend brain fart


Hi guys,

I'm just having issues with my append function. I have dead set
forgotten
how to do this. I have a query I want to loop over and for each time it
loops over I want to append an ID. I have done this a million
times...where...i don't know... code below

<cfset candlist = "202,203,204,205">
<cfscript>
        CChanges = QueryNew("CID");
</cfscript>

<cfset NewList = ''>
<cfloop query="CChanges">
        <cfset IDs = ListAppend(NewList,"#CChanges.CID#")>
        <cfoutput>#ids#</cfoutput>
</cfloop>

Bad week to give up coffee..

Jeremy






--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cfaussie" group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie
-~----------~----~----~----~------~----~------~--~---

Reply via email to