ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old April 12th, 2005, 11:20 PM
quad-com quad-com is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Location: Toronto, ON
Posts: 4 quad-com User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 19 sec
Reputation Power: 0
Exclamation bindings stored in DB

I have a DB which is the base for an email application. The body of the emails can/will contain extra user information such as firstname, lastname.

These fields are stored in the DB just as they would be if called within a page (#firstname#, #lastname#). The problem I am finding is these bindings are not being processed by CF, they just show up as they are typed in.

Any ideas how I can get these to process properly?

Q.

Reply With Quote
  #2  
Old April 12th, 2005, 11:26 PM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,627 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 10 h 8 m 55 sec
Reputation Power: 53
Pleast post your code. You definitely can use variables inside a CFMAIL tag.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
  #3  
Old April 12th, 2005, 11:39 PM
quad-com quad-com is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Location: Toronto, ON
Posts: 4 quad-com User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 19 sec
Reputation Power: 0
Explanation 2

It's a little hard to explain but here's another try..

Page 1 - Client designs the body of the email in an htmlarea window inside of which the client can enter #firstname#, #lastname# wherever they like. This entry is stored in a DB.

Page 2 - The client selects the member groups to send the email to.

Page 3 - The CFMAIL script takes over fed by a bunch of queries.


I hope this is a bit clearer.

Q.

Reply With Quote
  #4  
Old April 13th, 2005, 12:06 AM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,627 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 10 h 8 m 55 sec
Reputation Power: 53
Oh if you are asking if you can store actual CFML code in the database (ie the text in the DATABASE is "abc #firstName# xyz"), then I don't believe you can make this execute (in any language).

The only possible thing I could think of would be to wrap the text in evaluate() but I don't even think that would work and if it did it would be slow. Basically, storing code in the database is a bad idea and a difficult proposition.

Reply With Quote
  #5  
Old April 13th, 2005, 12:29 AM
quad-com quad-com is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Location: Toronto, ON
Posts: 4 quad-com User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 19 sec
Reputation Power: 0
Solution

Tried doing a search for "CFML code in the database", it's funny I was trying to think of every way to search for this problem and didn't think of that one until you wrote it.

I did find a solution on forta.com, it is practically the same as what you said, the evaluate idea. Just thought I would post the answer that seems to work for me.

#evaluate(de(myQuery.bodyText))#

In order to allow my client to have the flexibility of customizing thier emails for each recipient, we have to take a little performance hit. C'est La Vie....

Q.
(Thanks for you help)

Reply With Quote
  #6  
Old April 13th, 2005, 12:33 AM
Alas's Avatar
Alas Alas is offline
Wickedwd.com
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Location: wickedwd.com
Posts: 186 Alas Negative: is most likely a SPAMMER and a traitor to the cause. 
Time spent in forums: 17 h 22 m 55 sec
Reputation Power: 0
You explain wierd, but what your talking about sounds a lot like a forum...stay with me.

1. username/firstname are stored hence you will see Alas as posting this message

2. My message which is this text im typing now will appear as the "message".

3. Both of these are being stored in a Database. That how you can read this.

Is this what you are trying to create?

Reply With Quote
  #7  
Old April 13th, 2005, 10:52 AM
quad-com quad-com is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Location: Toronto, ON
Posts: 4 quad-com User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 19 sec
Reputation Power: 0
Kiteless actually hit it right on the mark. All is working just fine now.

Thanks.

Q.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > bindings stored in DB


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway