I have this code that goes through a db record set (with just one  
record) and creates a structure, full of variables for referencing:

<cfset db_info = StructNew()>
<cfloop list="#the_db.columnlist#" index="col">
        <cfset db_info[col] = the_db[col][currentRow]>
        <!--- attempting to make undefined an empty string --->
        <cfif db_info[col] EQ 'undefined'>
                <cfset the_db_info[col] = ''>
        </cfif>
</cfloop>

This creates, for example, db_info.semester and fills it with the  
content for the database field Semester.  I'd rather it just create a  
variable with the field name and fill it with content instead of  
sticking it in a structure.  In other words, I want <cfset semester =  
db.semester>  I want it to create a variable name based on the field  
name and fill it's content with the field content.

I can't seem to get that to work so far.

thank you.


-- 

Daniel Kessler

College of Health and Human Performance
University of Maryland
Suite 2387 Valley Drive
College Park, MD  20742-2611
Phone: 301-405-2545
http://hhp.umd.edu




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265988
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to