that did it! thank u so much!

-----Original Message-----
From: Scott Weikert [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 09, 2003 12:33 PM
To: CF-Talk
Subject: Re: List with commas

At 10:25 AM 10/9/2003, you wrote:
>Hi,
>I want to do something that seems like it should be easy, but i cant
>figure it out.
>i want to take my query results and output it with double quotes around
>each item with a comma seperated inbetween.
>
>Any help would be appreciated.  My query returns a bunch of tiles.  i want
>it to output like so: "Test 1", "Test 2", "Test 3"

<cfset NewList = "">
<cfloop query="yourquery">
<cfset NewList = ListAppend(NewList, '"' & variablename & '"')>
</cfloop>

In case it's tough to read, that's singlequote-doublequote-singlequote
around variablename.

Or, you could do a normal NewList = ValueList(queryname.variablename), then
Replace(NewList, ',', '","', 'all') then
cfset NewList = '"' & NewList & '"'

  _____  


[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to