2 options I think:
1. If you can modify the query, you could use ValueList().

<cfquery name="GetImages" datasource="#request.dsn#">
SELECT '../thumbs/' + thumbfile AS thumbpath, ...
</cfquery>
<cfset ListImages = ValueList(GetImages.thumbpath)>
(concatenator may be different depending on database!)

2. If you want to keep the query as it is, use ListAppend()

<cfset ListImages = "">
<cfloop query="GetImages">
<cfset ListImages =
ListAppend(ListImages,"../thumbs/#GetImages.thumbfile#")>
</cfloop>

HTH
Pascal

> -----Original Message-----
> From: Spectrum WebDesign [mailto:[EMAIL PROTECTED]
> Sent: donderdag 15 april 2004 22:25
> To: CF-Talk
> Subject: Inserting query inside comma lists
>
> Hi all
>
> how to insert all image name from a query to a comma separeted list?
>
> This is my query field: thumbfile
>
> This is my variable: ListImages...
>
> This code show only 1 image:
>
> <CFSET ListImages=''>
> <cfloop query="GetImages">
> <CFSET ListImages="../thumbs/#DocFileThumbs# & ','">
> </cfloop> <cfoutput> #ListImages# </cfoutput>
>
>
> Thanx for your time....
>
> --
> ___________________________________________________________
> Sign-up for Ads Free at Mail.com
> http://promo.mail.com/adsfreejump.htm
>
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to