>>However, when I add code of
>><cfoutput>#qClients.clientDirectory#</cfoutput>/image1.jpg to the
>>database, it doesn't display correctly--it instead shows the code.
Of course not.
Your asking CF to process/compile your code twice. Think about it, to do the
above the CF app server would have to process the <cfquery> to get the data
and then (re)process the data from the db to even 'know' there was a
<cfoutput> in the data.
I do not know much about what you are trying to accomplish big pictures
wise, but seems like you should/could store the 'clientDirectory' as a
session var (thinking you prob need it more than once).
something like:
<cfquery>
Select * from someTbl
Where clientDirectory = 'your way of identifying your clients';
</cfquery>
<cfset session.clientDirectory = myQuery.clientDirectory>
<img src="<cfoutput>#session.clientDirectory#/image1.jpg">
if your clients must login, set the session var(s) then.
HTH
-Craig
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm