Solved

coldfusion query string list

Posted on 2009-04-13
4
869 Views
Last Modified: 2012-05-06
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

0
Comment
Question by:wkolasa
  • 2
4 Comments
 
LVL 16

Accepted Solution

by:
duncancumming earned 450 total points
ID: 24131786
<cfset values = ValueList(List.sid_tbl)>

0
 

Author Comment

by:wkolasa
ID: 24131792
Nevermind - got it as soon as I typed it (I'm tired):

<cfset values = #valueList(List..sid_tbl)#>
0
 

Author Comment

by:wkolasa
ID: 24131799
Oh, hey Duncan... didn't notice you posted (and so fast).  Thanks much!
0
 
LVL 52

Assisted Solution

by:_agx_
_agx_ earned 50 total points
ID: 24131829
wkolasa,

Just fyi, you really don't need to use # signs with expressions like that.  
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, I will be creating today a basic tutorial on how we can create a Mail Custom Function and use it where ever we want. The main advantage about creating a custom function is that we can accommodate a range of arguments to pass to the Function and …
PROBLEM:  How to open a cfwindow or run a function on double click of a cfgrid row. One of my clients wanted to be able to double click on a row item to get more detailed information about a transaction and to be able to modify the line items i…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question