or #countryName[region][1]# if the query is only supposed to return a single row - the problem of course will occur if the query returns no rows, then [1] (or any number) will produce an error whereas #countryName.myregion# would return an empty string. So if there's any doubt that the query might ever be empty, you end up needing something like this <cfif countryName.recordcount>#countryName[region][1]#</cfif>
> #countryName[region][countryName.currentrow]# > -----Original Message----- > From: Protoculture [mailto:[EMAIL PROTECTED] > Sent: 23 March 2005 11:15 > To: CF-Talk > Subject: nesting variables... > I have defined a variable earlier in my template titled > region. and it > equals a string of my location... ie. CAN or US. > I also have a query titled countryName. > <cfquery name="countryName" datasource="#datasource#"> > select #region# from location where id = #form.location# > </cfquery> > So how could I use that region varible in order to access > the data retrieved > from my query like so below ( both versions throw an error > )... > #countryName[region]# OR #countryName[#region#]# s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://macromedia.breezecentral.com/p49777853/ http://www.sys-con.com/author/?id=4806 http://www.fusiontap.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:199752 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=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

