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
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
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
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
>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
>>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
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
>
]
/*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
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
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
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 '
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
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
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
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*
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#
>
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.
>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:
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
-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
>>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 ?
~~~
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
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
> 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
>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
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
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
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?
>
> >
>>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
>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#
~~
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
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
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
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?
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
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
36 matches
Mail list logo