I would not worry about doing a quick loop through the values. It really adds nothing in processing. I do it all the time to access variables directly as you are suggesting. For example, I do this to load the "preferences" a user has for a website.
#myPreferences[fontColor]#
etc.
Here's how..
Main Topics
Browse All Topics





by: MartinCMSPosted on 2009-07-22 at 07:34:51ID: 24915386
You can do something like this
RIBUTE_VAL UE
<cfquery name="getListing" datasource="">
SELECT ITEM_ID,ATTRIBUTE_NAME,ATT
FROM table1
</cfquery>
<table width="98%">
<thead>
<tr>
<td>Item ID</td>
<td>Attribute Name</td>
<td>Attribute Value</td>
</tr>
</thead>
<tbody>
<cfoutput query="getListing">
<tr>
<td>#ITEM_ID#</td>
<td>#ATTRIBUTE_NAME#</td>
<td>#ATTRIBUTE_VALUE#</td>
</tr>
</cfoutput>
</tbody>
</table>