Solved

coldfusion query string list

Posted on 2009-04-13
4
859 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
Comment Utility
<cfset values = ValueList(List.sid_tbl)>

0
 

Author Comment

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

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

Author Comment

by:wkolasa
Comment Utility
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
Comment Utility
wkolasa,

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

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article  is about submitting  form through  ColdFusion.Ajax.submitForm to the action page and send a response back in JSON format which later can be decoded using ColdFusion.JSON.decode. By this way you can avoid the usual page refresh for subm…
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 …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

771 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

11 Experts available now in Live!

Get 1:1 Help Now