coldfusion query string list


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.


<cfquery name="List" datasource="#REQUEST.dsn#">
select name_tbl, id_tbl, sid_tbl
from tbl
<!---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

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

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

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

Just fyi, you really don't need to use # signs with expressions like that.  
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.