Reputation: 2364
I have two queries: dosome and infom.
dosome is a query that gets the row of an employee's information from a table of eomployees.
infom is a query that gets the list of basic information that the website is currently keeping track of (i added this so that the website could dynamically grow without me as my client needs to add more things to his database).
I can get #infom.name_of_info#, which is lets say "first_name". I want to get #dosome.first_name#. Except I want to get it by doing something like this:
<cfset s = "dosome."&"#infom.name_of_info#">
That line above works. What doesn't work is the version that would allow me to access the data I want from the query.
<cfset s = "#"&"dosome."&"#infom.name_of_info#"&"#">
Is there a way make the string #dosome.#infom.name_of_info##, so that I can access the data in dosome by using the data in infom.
EDIT: I've now tried this:
<cfset s = "##"&"dosome."&"#infom.name_of_info#"&"##">
and s equals "#dosome.first_name#". Which is exactly what I wanted, but now I can't access the data. The string is appearing instead of the data I want. The line of code where I use the string is here:
<cfinput name="#infom.name_of_info#" type="text" value="#variables.s#">
Upvotes: 0
Views: 75