Quick question. Is it possible to take a predefined variable and add
that as part of another variable name inside cfset.
Here is my example.
<cfquery name = "qryLinkMaster" datasource = "#request.dsn#">
SELECT link_ID,
name,
url,
comment,
category,
active
FROM links
WHERE active = Yes
</cfquery>
And using QoQ
<cfset linkItems = "Drivers,Security,Search,Partner,Admin" />
<cfloop index="linkIndex" list="linkItems">
<cfquery dbtype="query" name="qry#linkIndex#Links">
SELECT *
FROM qryLinkMaster
WHERE category = '#lcase(linkIndex)#'
</cfquery>
<!--- here is my problem ---->
<cfset link(insert linkIndex value to variable name here) = linkIndex
</cfloop>
But before the loop ends I want to be able to name a variable WITH the
relevant linkIndex in its name (to make it unique) so that in the above
example I would have
linkDrivers,linkSecurity,linkSearch etc defined as variables. It wont
let me add a predefined variable to a one new one and I keep getting
syntax errors.
Any ideas??
TIA
Mark
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:209371
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54