When I run this code below I end up getting the column name in the cfoutput
at the bottom.

How would I get the value of that instead?  I am only pulling on record from
the db and I want to be able to load that into a structure so as to not have
to pass around that information from screen to screen via the URL or Hidden
Form or Session Variables.

<cfquery name="get_user_data" datasource="#attributes.maindsn#">
select id, cfid, member_id, member_password, password_hint,     last_name,
        first_name,     phone, address1, address2, city, state, zip, country,
        comments, account_active_status, date_created, terms_agreed
from member
where cfid = '#client.cfid#'
</cfquery>

<!--- Set my default local variables that will be needed to create the
dynamic structure --->
<cfset num_rows = ListLen(get_user_data.columnlist)>
<cfset cnt = 1>
<cfset qry_list = "#get_user_data.columnlist#">

<!--- Create the structure that we are going to populate in the next
step --->
<cfset stc_UserData = StructNew()>
<!--- Loop over the query list to populate the structure data --->
<cfloop from="1" index="cnt" to="#num_rows#">
        <cfset tmpname = ListGetAt(qry_list, cnt)>
        <cfset stc_UserData["#tmpname#"] = "#tmpname#">
        <cfset cnt = cnt + 1>
</cfloop>


<cfoutput>#stc_UserData.last_name#</cfoutput>

Thanks in Advance!!

Bill

------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to