Solved

coldfusion query string list

Posted on 2009-04-13
4
881 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Application Discovery Service in AWS

In the era of the cloud, customers migrating away from their existing on-premise infrastructure. This requires lots of planning, strategies, and effort to identify their existing resources and determine how best to migrate.  Datacenter migrations happen in four phases -

Question has a verified solution.

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

The technique is by far very Simple! How we can export the ColdFusion query results to DOC file?  Well before writing this I researched a lot in Internet but did not found a good Answer anyways!  So i thought now i should share my small snippet w…
Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them (http://www.randhawaworld.com/) . I did keep the main js functions but made sever…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

622 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