Hi Mark, 

No, CF doesn't have an equivalent of anything like javascript eval() which will allow 
you to execute statements embedded in a string. The closest CF comes (as of yet 
anyway) is evaluate() which will only return an expression (variable, or variable and 
function calls), but won't execute statements. 

So that being said, the only way to execute cf code stored in a database is to write 
the code to a cf template and then include that template with cfinclude or possibly 
cfmodule. If you've got a unique identifier on the table, it should be relatively easy 
to write the file (with the file name based on the unique identifier column for the 
table) whenever the content is updated in the database. 

hth 

Isaac

Original Message -----------------------
I have a database table that holds the "body" contents of a page. (simple
contentment management system) I just tried to put a cfinclude in a db
record and found that CFMX does not evaluate the code.  CFMX will just send
the cfinclude tag to the browser, as unrendered source code, just like any
other normal html tag.  Is there a way I can make CFMX render CFtags that
are stored in a db record? Seems like there should be an EZ way to do this.

Mark W. Breneman
-Macromedia Certified ColdFusion Developer
-Network / Web Server Administrator
  Vivid Media
  [EMAIL PROTECTED]
  www.vividmedia.com
  608.270.9770



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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

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

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to