Opps, forgot the <cfoutput query="GetEnv">

<cfquery name="GetEnv" datasource="database-name" dbtype="ODBC">
        SELECT      strVar,strDestination
        FROM        users
</cfquery>

<cfoutput query="GetEnv">
        <cfset myString = ListAppend(myString, GetEnv.strVar, ",")>
</cfoutput>

Ade

-----Original Message-----
From: Adrian Lynch [mailto:adrian.l@;thoughtbubble.net]
Sent: 22 October 2002 17:37
To: CF-Talk
Subject: RE: Read from database and insert into string


<cfquery name="GetEnv" datasource="database-name" dbtype="ODBC">
        SELECT      strVar,strDestination
        FROM        users
</cfquery>

<cfset myString = ListAppend(myString, GetEnv.strVar, ",")>

Ade

-----Original Message-----
From: FlashGuy [mailto:flashmx@;rogers.com]
Sent: 22 October 2002 17:33
To: CF-Talk
Subject: Read from database and insert into string


Hi,

I need to read from my database the field strVar. I have 500+ entries. I
need to read every line from the database, grab the contents of that field
and put all the data into a 
variable called "results". They must all be comma delimited.

        <cfquery name="GetEnv" datasource="database-name" dbtype="ODBC">
                SELECT      strVar,strDestination
                FROM        users
        </cfquery>

Do I need to loop through it?

Example:

variable = "var1,var2,var3,var4...etc"





---------------------------------------------------
Colonel Nathan R. Jessop
Commanding Officer
Marine Ground Forces
Guatanamo Bay, Cuba
---------------------------------------------------





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to