Hi Mike,
CFML doesn't have any built-in evaluation feature, the way that you might
evaluate code in say JavaScript by building a long string and then using
eval(myJavaScriptString) to execute that code ... So in order to execute
cfml code which has been stored in the database, you would first have to
write the code to a file. In CF MX you might be able to design a fairly nice
user-defined function to do this by first drawing the query, then writing
the code to a temp file which is then included and deleted all within the
function, so you'd wind up with something like ...
<BODY bgcolor="#FFFFFF">
<CFINCLUDE template="_top.cfm">
<TABLE width="600" border="0" bgcolor="99CC99"
cellpadding="0" cellspacing="0">
<TR><TD valign="top">
<cfoutput>#cfsqleval(NavItemID)#</cfoutput>
</TD></TR>
</TABLE>
<CFINCLUDE template="_footer.cfm">
</BODY>
Although for what it's worth, I would probably create a new directory for
the templates, store the cfml in the db and every time the db gets updated,
write the contents to a file named with the navitemid of the given record in
the template directory, i.e. <cfinclude
template="templates/#numberformat(navitemid,'000000')#.cfm"> ... this would
save a lot of overhead in constantly collecting info from the db, writing
and deleting temp files... and if the file gets corrupted, moved or deleted,
your db has a convenient backup...
hope this helps,
Isaac
www.turnkey.to
954-776-0046
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists