Re: Won't evaluate?

2008-10-10 Thread James Holmes
And finally, do you really want a user to be able to add any random CF expression into the DB to be executed? Combine this with something like a URL variable or form post and the results could make SQL injection look like a minor inconvenience. Replacing placeholders is much safer. mxAjax / CFAja

Re: Won't evaluate?

2008-10-10 Thread Aaron Rouse
Yeah but you have to be careful with how much you use those functions in an application. I know at least on our CF6 server here for one project that extensively uses those it does in fact eat up a good bit of resources when a normal user load is on it. On Fri, Oct 10, 2008 at 4:50 PM, Ian Skinner

Re: Won't evaluate?

2008-10-10 Thread Ian Skinner
Ian Skinner wrote: > > > #Evaluate(DE(FAQ.Answer))# > > O.K. I have never really done anything with this recursive rendering of ColdFusion variables inside of ColdFusion variables before. But this is kind of cool to my geeky soul!!! In a very much, 'Why the he

Re: Won't evaluate?

2008-10-10 Thread Phillip M. Vector
Thanks! :) This makes it allot easier. :) Ian Skinner wrote: > Going back to you original question, contrary to Azadi's and Matt's answers, > you can do this. I am not sure this is better then the replacement technique > that has already been worked out, but in the names of fairness and > comp

Re: Won't evaluate?

2008-10-10 Thread Ian Skinner
>I have in my DB under the field of answer... > >We have currently #users.recordcount# players signed up with this site >that your event would reach. While it may not be many in the pure view, >if 7 come to your convention, that would pay for our services (Figuring >the room costs a total of $20

Re: Won't evaluate?

2008-10-10 Thread Claude Schneegans
>>Yes, I know scoping my variables is a good thing now and I will from now on when needed. But honestly, it so rarely comes up as an issue Right. A good practice to avoid trouble if you don't scope is at least to use different names for variables in different scopes, especially with queries. The

Re: Won't evaluate?

2008-10-10 Thread Aaron Rouse
ic > > /*-Original Message- > /*From: Aaron Rouse [mailto:[EMAIL PROTECTED] > /*Sent: Friday, October 10, 2008 2:28 PM > /*To: cf-talk > /*Subject: Re: Won't evaluate? > /* > /*While the naming is bad, why not learn from the experience and try to > /*scope >

RE: Won't evaluate?

2008-10-10 Thread Eric Roberts
] /*Sent: Friday, October 10, 2008 2:28 PM /*To: cf-talk /*Subject: Re: Won't evaluate? /* /*While the naming is bad, why not learn from the experience and try to /*scope /*things? It could save you a lot of random headaches over the years. /* /*On Fri, Oct 10, 2008 at 2:22 PM, Phillip M. V

RE: Won't evaluate?

2008-10-10 Thread Eric Roberts
08 2:23 PM /*To: cf-talk /*Subject: Re: Won't evaluate? /* /*Ian Skinner wrote: /*> /*> #Question# /*> /*> /*> Is ColdFusion seeing that as 'variables.question' or /*'variables.FAQ.question' you have both on this block of code. And it may /*not be

RE: Won't evaluate?

2008-10-10 Thread Dave Francis
age- From: Phillip M. Vector [mailto:[EMAIL PROTECTED] Sent: Friday, October 10, 2008 3:08 PM To: cf-talk Subject: Re: Won't evaluate? Claude Schneegans wrote: > >>Replace(FAQ.Question, '$$UserCount$$', usercount, "ALL") > > It may also be an question

Re: Won't evaluate?

2008-10-10 Thread Phillip M. Vector
Ian Skinner wrote: > Or just be specific in what you wanted to output. Modifying your > original code in the following manner will achieve the exact same result > as changing the variable names, and demonstrates a better practice of > scoping your variables. I hope you at least wrote that as '

Re: Won't evaluate?

2008-10-10 Thread Ian Skinner
Phillip M. Vector wrote: > Ian Skinner wrote: > >> >> #Question# >> >> >> Is ColdFusion seeing that as 'variables.question' or >> 'variables.FAQ.question' you have both on this block of code. And it may >> not be picking the one you want to output. If so then be specific in which >> o

Re: Won't evaluate?

2008-10-10 Thread Aaron Rouse
While the naming is bad, why not learn from the experience and try to scope things? It could save you a lot of random headaches over the years. On Fri, Oct 10, 2008 at 2:22 PM, Phillip M. Vector < [EMAIL PROTECTED]> wrote: > Ian Skinner wrote: > > > > #Question# > > > > > > Is ColdFusion s

Re: Won't evaluate?

2008-10-10 Thread Phillip M. Vector
Thanks for the explination. I understand the issue now. :) Peter Boughton wrote: >> I'm just using a cfoutput querry loop. >> >> But I put in [CurrentRow] just in case. No change. Still not working. > > Not sure if you're understanding fully, so I'll simplify completely: > (apologies if any of th

Re: Won't evaluate?

2008-10-10 Thread Phillip M. Vector
Ian Skinner wrote: > > #Question# > > > Is ColdFusion seeing that as 'variables.question' or 'variables.FAQ.question' > you have both on this block of code. And it may not be picking the one you > want to output. If so then be specific in which one you want. OOOohhh *slaps forehead*

Re: Won't evaluate?

2008-10-10 Thread Aaron Rouse
Like I said if it is in a loop over a query then you need to scope the variables within the div elements. That is your problem. On Fri, Oct 10, 2008 at 1:57 PM, Phillip M. Vector < [EMAIL PROTECTED]> wrote: > Here's the full code. > > > > > > > > >#Question# >

Re: Won't evaluate?

2008-10-10 Thread Ian Skinner
Phillip M. Vector wrote: > Peter Boughton wrote: > >> 1) Scope the variable, e.g. using #Variables.Question# instead of just >> #Question# Did you do this one Phillip. I'm late to this discussion so I don't really know what your issue is. But you have some pretty ambiguous code here.

Re: Won't evaluate?

2008-10-10 Thread Peter Boughton
>I'm just using a cfoutput querry loop. > >But I put in [CurrentRow] just in case. No change. Still not working. Not sure if you're understanding fully, so I'll simplify completely: (apologies if any of this is patronising) This code here: #Question# Will do the same as this:

Re: Won't evaluate?

2008-10-10 Thread Phillip M. Vector
Claude Schneegans wrote: > >>Replace(FAQ.Question, '$$UserCount$$', usercount, "ALL") > > It may also be an question of upper/lower case. > Are you sure you always have "UserCount" ? > If not, use replaceNoCase() instead. It's exactly that. > >>just doesn't show any usercount. > > Does it sho

Re: Won't evaluate?

2008-10-10 Thread rex
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Like Aaron and Peter said, SCOPE your variables like so: #VARIABLES.Question# #VARIABLES.Answer# When you are referencing #Question# you are actually

Re: Won't evaluate?

2008-10-10 Thread Claude Schneegans
>>Replace(FAQ.Question, '$$UserCount$$', usercount, "ALL") It may also be an question of upper/lower case. Are you sure you always have "UserCount" ? If not, use replaceNoCase() instead. >>just doesn't show any usercount. Does it show any '$$UserCount$$' then ? ~~~

Re: Won't evaluate?

2008-10-10 Thread Phillip M. Vector
Heh.. True enough. Peter Boughton wrote: > If you have someone kick you every time you do it, you can break most habits > much quicker. :) ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date G

Re: Won't evaluate?

2008-10-10 Thread Phillip M. Vector
I'm just using a cfoutput querry loop. But I put in [CurrentRow] just in case. No change. Still not working. Peter Boughton wrote: >> Is it inside a loop over a query? If so then scope your outputed variables >> in those div elements. > > That sounds likely to be the problem - CF will give prio

Re: Won't evaluate?

2008-10-10 Thread Peter Boughton
> old habbits are hard to break. If you have someone kick you every time you do it, you can break most habits much quicker. :) ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free

Re: Won't evaluate?

2008-10-10 Thread Peter Boughton
>Is it inside a loop over a query? If so then scope your outputed variables >in those div elements. That sounds likely to be the problem - CF will give priority to the query vars in resolving unscoped variables. To clarify a little, the possible solutions are: 1) Scope the variable, e.g. usin

Re: Won't evaluate?

2008-10-10 Thread Phillip M. Vector
Here's the full code. #Question# #Answer# So yeah. it's looping fine. Just doesn't show any usercount. Aaron Rouse wrote: > Is it inside a loop over a query? If so then scope your outputed varia

Re: Won't evaluate?

2008-10-10 Thread Phillip M. Vector
Peter Boughton wrote: > Not sure - make sure the database contains this text: > "We have currently $$UserCount$$ players signed up with this site" Yup. That's all that is in the field. ~| Adobe® ColdFusion® 8 software 8 is the mo

Re: Won't evaluate?

2008-10-10 Thread Phillip M. Vector
I know.. I know.. It isn't pretty code.. But it's how I learned how to do it and old habbits are hard to break. I seriously doubt that the #'s are messing things up. Yup. Cleaned it up and it's still not displaying correctly. Claude Schneegans wrote: > >>So why isn't this working then? > > >

Re: Won't evaluate?

2008-10-10 Thread Claude Schneegans
>>So why isn't this working then? >> >> You're not using # signs correctly : # sign should be used only inside http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313740 Subscription: http://www.houseoffusio

Re: Won't evaluate?

2008-10-10 Thread Peter Boughton
>So why isn't this working then? > > [snip] Not sure - make sure the database contains this text: "We have currently $$UserCount$$ players signed up with this site" ? Also, your code has far too many hashes - here it is cleaned up a little: #Question# #Answer# ~~

Re: Won't evaluate?

2008-10-10 Thread Aaron Rouse
Is it inside a loop over a query? If so then scope your outputed variables in those div elements. Also do not need the pound signs in your two cfsets both on the replace functions and the usercount variables. On Fri, Oct 10, 2008 at 1:40 PM, Phillip M. Vector < [EMAIL PROTECTED]> wrote: > So wh

Re: Won't evaluate?

2008-10-10 Thread Phillip M. Vector
So why isn't this working then? #Question# #Answer# Azadi Saryev wrote: > another alternative may be to get your users.recordcount number in a > variable in the page that displays the

Re: Won't evaluate?

2008-10-09 Thread Phillip M. Vector
Ok.. Thanks. :) Matt Quackenbush wrote: > The short answer is: you don't. > > The longer version is, you can setup placeholders and do a replace on them > to enter the values that you're wanting to use. > > > On Thu, Oct 9, 2008 at 8:38 PM, Phillip M. Vector wrote: > >> How do I make CF treat

Re: Won't evaluate?

2008-10-09 Thread Matt Quackenbush
The short answer is: you don't. The longer version is, you can setup placeholders and do a replace on them to enter the values that you're wanting to use. On Thu, Oct 9, 2008 at 8:38 PM, Phillip M. Vector wrote: > How do I make CF treat data it pulls from the DB as variables and not a > string?

Re: Won't evaluate?

2008-10-09 Thread Azadi Saryev
cf won't evaluate your variable inside a variable (#users.recordcount# inside #FAQ.answer"). you best bet will be to either store that text in a cfm file and cfinclude it, or do it on the fly by pulling that text from db, writing it to a temp file and cfinclude that file. another alter

Won't evaluate?

2008-10-09 Thread Phillip M. Vector
I have in my DB under the field of answer... We have currently #users.recordcount# players signed up with this site that your event would reach. While it may not be many in the pure view, if 7 come to your convention, that would pay for our services (Figuring the room costs a total of $200 and