Solved

coldfusion query string list

Posted on 2009-04-13
4
865 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

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…
Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math (http://www.bennadel.com/blog/197-How-I-Stop-Spammers-On-My-ColdFusion-Blog.htm). While this method is not o…
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

929 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now