coldfusion query string list

Hi,

I want to run a cfquery, the through all the value results into a variable.  Something like below.  

I'm just drawing a blank as to how to do this (b/c I have 15 other 'urgent' things and jetlag.

Thanks!


<cfquery name="List" datasource="#REQUEST.dsn#">
select name_tbl, id_tbl, sid_tbl
from tbl
</cfquery>
 
<!---the values from the query are 1,2,3,4,5--->
 
<cfset Values=#list.sid_tbl>
 
<cfoutput>#values#</cfoutput> ----- this would display as:  1,2,3,4,5

Open in new window

wkolasaAsked:
Who is Participating?
 
duncancummingConnect With a Mentor Commented:
<cfset values = ValueList(List.sid_tbl)>

0
 
wkolasaAuthor Commented:
Nevermind - got it as soon as I typed it (I'm tired):

<cfset values = #valueList(List..sid_tbl)#>
0
 
wkolasaAuthor Commented:
Oh, hey Duncan... didn't notice you posted (and so fast).  Thanks much!
0
 
_agx_Connect With a Mentor Commented:
wkolasa,

Just fyi, you really don't need to use # signs with expressions like that.  
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.