Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help on variable within variable

0 views
Skip to first unread message

ultrakit

unread,
Jan 23, 2011, 3:18:05 AM1/23/11
to
Hi,
Trying to achieve the following:

In my database table, I have 2 fields: NavName1, NavName2

On Application.cfm, I've set a Session.LangSelect = 1.

On a page, people can change the value of Session.LangSelect. I then
run a cfquery to output the value of the field. Depending on the
Session.LangSelect, different field (NavName1 OR NavName2) would be
loaded.

<cfoutput query="x">
##navName#Session.SelectLang##
</cfoutput>

And I get a CFML construct error. What should I do? Thanks in
advance!

Bob Dively

unread,
Jan 24, 2011, 5:04:02 PM1/24/11
to
ultrakit <ultr...@gmail.com> wrote:
> Hi,
> Trying to achieve the following:

> In my database table, I have 2 fields: NavName1, NavName2

> On Application.cfm, I've set a Session.LangSelect = 1.

> On a page, people can change the value of Session.LangSelect. I then
> run a cfquery to output the value of the field. Depending on the
> Session.LangSelect, different field (NavName1 OR NavName2) would be
> loaded.

> <cfoutput query="x">
> ##navName#Session.SelectLang##
> </cfoutput>

#x[ "navname" & Session.SelectLang ][ CurrentRow ]#

--
Bob Dively | I used to be indecisive, but now I'm not sure...

0 new messages