So you want to change this:

1,2,3,4,5

into this:

'1','2','3','4','5'

Or, do you have:

'1','2','3','4'

and you want to add 5 to that list wrapped in single quotes?

If the former, try:

<cfset list = "1,2,3,4,5">
<cfset newList = "'" & Replace(list, ",", "','", "ALL") & ",">

If the later, try:

<cfset list = "'1','2','3','4'">
<cfset newList = ListAppend(list, "'5'")>

Is that what you were asking?

Adrian
http://www.adrianlynch.co.uk

-----Original Message-----
From: sam menon
Sent: 09 January 2008 04:44
To: CF-Talk
Subject: ListAppend


Hi,
  I am trying to construct a "'," delimited string to pass it to cfquery

this is my code
But its appending only first character,

<cfset del="',">
<cfset
lst=ListAppend(lst,#xmlDocHotelData.xmlroot.ImageGallery.xmlChildren[i].xmlt
ext#,#del#)>
</cfloop>

Can anyone please help me...I am new to coldfusion


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:296216
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