So, doesn't your database have some mechanism for doing the same thing
in the initial query? Or, do you need the data in the original (with
commas) format, too? In oracle, I could use the translate function to
turn all commas into something else, if I wanted to strip them out.

On 8/21/05, Tony <[EMAIL PROTECTED]> wrote:
> :) this did it :)
> 
>      <cfloop from = 1 to = #session.menuMatrix.recordCount# index = i>
>           <cfset fixTheCommas =
> querySetCell(session.menuMatrix,"menuitem",replace(session.menuMatrix.menuItem[i],',','','all'),i)>
>      </cfloop>
> 
> i always do this... get lost, send list mail, think about, fix :)
> 
> later
> tw
> 
> On 8/21/05, Jim Davis <[EMAIL PROTECTED]> wrote:
> > > -----Original Message-----
> > > From: Tony [mailto:[EMAIL PROTECTED]
> > > Sent: Sunday, August 21, 2005 7:08 PM
> > > To: CF-Community
> > > Subject: can you replace a valueList() ...
> > >
> > > can you do this?
> > >
> > > listToArray(valueList(replace(session.menuMatrix.menuItem,',',' ','all')))
> >
> > Breaking this down you can't do:
> >
> > replace(session.menuMatrix.menuItem,',',' ','all')
> >
> > Unless session.menuMatrix.menuItem is a string - if it's (as I think it is?)
> > a column in a query this won't work.
> >
> > However what do want at the end?  If it's just an array you can already
> > access an Query Column as an array.
> >
> > You can do:
> >
> > <cfloop from="1" to="#ArrayLen(session.menuMatrix.menuItem)#" index="Cnt">
> >         <cfoutput>#session.menuMatrix.menuItem[Cnt]#</cfoutput>
> > </cfloop>
> >
> > There's very little Array processing that you can't do with query column as
> > it is.
> >
> > If that's not what you want to do and you really need the delimited list
> > first remember that valueList() (and ALL the CF list functions) can accept a
> > delimiter as an argument.  You don't HAVE to use a comma as your delimiter -
> > and I wouldn't if your content has commas.  You can pick an odd control
> > character or anything that's not going to be in your content.
> >
> > Jim Davis
> >
> >
> >
> >
> >
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Purchase Contribute 3 from House of Fusion, a Macromedia Authorized Affiliate 
and support the CF community.
http://www.houseoffusion.com/banners/view.cfm?bannerid=53

Message: http://www.houseoffusion.com/lists.cfm/link=i:5:170604
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/5
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:5
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.5
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to