> I'm trying to populate a function call, by looping over the
> record count of a query
What you have looks fine to me. What's the problem, exactly?
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our tra
> yea but...function calls shouldn't have dynamic number of arguments.
Why not?
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern
yea but...function calls shouldn't have dynamic number of arguments.
perhaps u mean to create a list of arguments and pass it in as 1 argument?
~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
da
lemme rephrase...
I'm trying to populate a function call, by looping over the record count
of a query
to end up with something like this:
function(sunday_0, mon_0, tues_0)
function(sunday_1, monday_1, tues_1)
etc.
the number is dynamic based on the record count of a query..
code:
if(IsDefine
> Is it possible to do a query output loop in cfscript using
> something other than WriteOutput?
The only way to write any output directly from CFSCRIPT is to use
WriteOutput. You can, of course, invoke functions written in CFML from
CFSCRIPT.
Dave Watts, CTO, Fig Leaf Software
http://www.figlea
nope,
I need to populate a function call based on another query
Brad Wood wrote:
> Are you wishing for your function to return the generated content as a
> return variable as opposed to directly outputting to the page buffer?
>
> If so, you can concatenate strings together and then return th
trying to make sense out of some screwy logic that someone else did
although I'm about ready to rewrite it with tags...
Charlie Griefer wrote:
> On Tue, Aug 26, 2008 at 10:45 AM, Scott Stewart <[EMAIL PROTECTED]>wrote:
>
>
>> Is it possible to do a query output loop in cfscript using somet
Are you wishing for your function to return the generated content as a
return variable as opposed to directly outputting to the page buffer?
If so, you can concatenate strings together and then return the string at
the end of the function.
I'm not really sure where you are going with this thoug
On Tue, Aug 26, 2008 at 10:45 AM, Scott Stewart <[EMAIL PROTECTED]>wrote:
> Is it possible to do a query output loop in cfscript using something
> other than WriteOutput?
>
obvious question is... why? :)
for (i=1; i lt queryname.recordcount; i=i+1) { // you can pretty that up a
bit if you're on
:51
To: CF-Talk
Subject: RE: CFSCRIPT Question
> I was under the impression that there was a performance gain
> with cfscript, is that not the case? Is there no benefit to
> using cfscript?
I haven't been able to determine any significant performance change one way
or the other wi
> I was under the impression that there was a performance gain
> with cfscript, is that not the case? Is there no benefit to
> using cfscript?
I haven't been able to determine any significant performance change one way
or the other with CFMX. There may have been performance differences in prior
Owner, Three Ravens Consulting
[mailto:[EMAIL PROTECTED]
Sent: Monday, January 02, 2006 1:07 PM
To: CF-Talk
Subject: Re: CFSCRIPT Question
I am not aware of any benefit other than personal
preference...
Eric
On Mon, 2 Jan 2006 11:38:27 -
"Andy McShane" <[EMAIL PROTECTED]> wro
nefit to using
>cfscript?
>
> -Original Message-
>From: Aaron Rouse [mailto:[EMAIL PROTECTED]
> Sent: 30 December 2005 19:03
> To: CF-Talk
> Subject: Re: CFSCRIPT Question
>
> Probably not, could be debated that it was on older
>versions of CF. I
> person
L PROTECTED]> wrote:
> I was under the impression that there was a performance gain with cfscript,
> is that not the case? Is there no benefit to using cfscript?
>
> -Original Message-
> From: Aaron Rouse [mailto:[EMAIL PROTECTED]
> Sent: 30 December 2005 19:03
> To:
I was under the impression that there was a performance gain with cfscript,
is that not the case? Is there no benefit to using cfscript?
-Original Message-
From: Aaron Rouse [mailto:[EMAIL PROTECTED]
Sent: 30 December 2005 19:03
To: CF-Talk
Subject: Re: CFSCRIPT Question
Probably not
Probably not, could be debated that it was on older versions of CF. I
personally am a cfscript nazi, use it a lot more than I really should.
On 12/30/05, Ben Doom <[EMAIL PROTECTED]> wrote:
>
> Is it ever actually necessary? :-)
>
> --Ben
>
>
~~~
Is it ever actually necessary? :-)
--Ben
Adrocknaphobia wrote:
> Sounds like you are using cfscript unnecessarily.
>
> -Adam
>
> On 12/30/05, Andy Mcshane <[EMAIL PROTECTED]> wrote:
>
how do I call a stored procedure from within cfscript?
>>>
>>>Wrap it in a tag and call it as a function
Sounds like you are using cfscript unnecessarily.
-Adam
On 12/30/05, Andy Mcshane <[EMAIL PROTECTED]> wrote:
> >> how do I call a stored procedure from within cfscript?
> >
> >Wrap it in a tag and call it as a function.
> >
> >Paul
>
> Now I feel stupid, knew it would be something simple! Thanks
>> how do I call a stored procedure from within cfscript?
>
>Wrap it in a tag and call it as a function.
>
>Paul
Now I feel stupid, knew it would be something simple! Thanks.
~|
Logware (www.logware.us): a new and convenient we
I was sure I read that tags were allowed inside cfscript blocks somewhere,
but it doesn't appear to work.
-Original Message-
From: Andy Mcshane [mailto:[EMAIL PROTECTED]
Sent: 30 December 2005 10:46
To: CF-Talk
Subject: CFSCRIPT Question
I have a large block of cfscript that I now have t
> how do I call a stored procedure from within cfscript?
Wrap it in a tag and call it as a function.
Paul
~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/
If you're using CF variables in your SQL you may* need to escape any
single quotes when you're creating your SQL statement in the first
place:
#preserveSingleQuotes(sql)#
Bert
* if there's any chance they will contain single quotes then you'll
need to escape them
On Thu, 9 Dec 2004 08:23
I use preserveSingleQuotes with MySQL without any issue. You
shouldn't need to do anything special:
#preserveSingleQuotes(sql)#
On Wed, 8 Dec 2004 18:08:02 -0500, C. Hatton Humphrey
<[EMAIL PROTECTED]> wrote:
> > Why not just double up the single quotes?
>
> Tried that - may be a NDA thin
I think you need to escape (i.e. double up) the single quotes in any
CF vars you're using in the query, then use preservesinglequotes()
inside cfquery tag.
mySQLstring = "SELECT orders_id FROM Orders WHERE label =
'#Replace(This_Label, "'", "''", "all")#'";
#PreserveSingleQuote
> Why not just double up the single quotes?
Tried that - may be a NDA thing or just a MySQL thing - I got the same
error when sending the query.
To answer Barney's question - I'm using a MySQL database. That's what
the clent has and I haven't been able to dissuade him from using it.
When I sent
Why not just double up the single quotes?
> Okay, to try and make my life easier I decided to try changing a
> block
> of code from CFSet to CFScript.
>
> However, part of what I need to do in this code is run a query based
> on a variable value... I'm pulling a label out of a record body and
>
What database are you using? preserveSingleQuotes() has always worked
for me, exactly as intended.
However, before you go too far down this road, I'd recommend not using
CFSCRIPT for this code, because there is a query inside. Sure, you
can make a wrapper, as you tried, but doing that will preve
>>Required and necessary are two different things.
In logic terms, they are not.
>>Using 'var' isn't required, but it is definitely necessary,
Let's say it's recommended, not required nor necessary, but highly recommended.
--
___
See some cool custom tags her
> > What makes you think it is isn't necessary?
>
> Because it isn't. Period.
Required and necessary are two different things. Using 'var' isn't
required, but it is definitely necessary, at least in anything approaching
normal circumstances.
Cheers,
barneyb
[Todays Threads]
[This Message]
> > What makes you think it is isn't necessary?
>
> Because it isn't. Period.
I think I was very clear just a few words later that this was just my
opinion.
>
> > Any variable created inside a
> > cfscript based function, or a cffunction based function, must be var
> scoped.
> > Period. (Well,
- Original Message -
From: "Raymond Camden" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, May 07, 2004 11:49 AM
Subject: RE: cfscript question
> What makes you think it is isn't necessary?
Because it isn't. Period.
>
What makes you think it is isn't necessary? Any variable created inside a
cfscript based function, or a cffunction based function, must be var scoped.
Period. (Well, ok, yea, it works w/o the var scope, but leaving them off is
very risky.)
[Todays Threads]
[This Message]
[Subscription]
[Fast
Yes, the variables are in the variables scope. While it is not necessary
to use the var statement, you probably want to for such things as loop
counters and other local variables.
http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/udfs12.htm
HTH
--Nathan
Yeah, they're in the VARIABLES scope. There's really no difference between
a CFSCRIPT function and a CFFUNCTION one, except that you can use tags,
declare named optional arguments and do typechecking with CFFUNCTION. Other
than that, I believe the two are 100% equivalent.
Cheers,
barneyb
>
;
Date: Friday, August 25, 2000 10:05 AM
Subject: RE: CFSCRIPT question
>How would you then check for a particular value of a key within the same
>cfif? In other words I am doing something similar where I am checking for
>the existence of a key but then how do I filter so I get on
if (NOT StructKeyExists(SESSION.car, ATTRIBUTES.name)) {
do stuff here
}
else
{
do other stuff here
}
The "else" is actually optional. But I figured I'd throw it in as an
example.
Sharon
-Original Message-
From: Jon Tillman <[EMAIL PROTECTED]>
To: [
: David E. Crawford [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 24, 2000 9:00 AM
To: [EMAIL PROTECTED]
Subject: Re: CFSCRIPT question
Oops. Left off a )
Should be
blah
- Original Message -
From: "David E. Crawford" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECT
Oops. Left off a )
Should be
blah
- Original Message -
From: "David E. Crawford" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 24, 2000 12:56
Subject: Re: CFSCRIPT question
>
> blah
>
>
>
> - Original Mess
blah
- Original Message -
From: "Jon Tillman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, August 24, 2000 07:27
Subject: CFSCRIPT question
> I have the following as cfscript:
>
> if (not(structKeyExists(session.cart, attributes.name)))
>
> I would like to use it as
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
You can't use any kind of tag in cfscript. 4.5 finally has support
for creating objects in script instead of with CFObject, but that's
about the best you can do so far. I do hope Allaire makes the rest
of CF's functionality accessible from script so
Remove the quotes around URL.PAGE. Right now you're setting PAGE to the
value "url.page" (which I assume you don't want to do) instead of the value
contained in url.page.
Also add a break; as the last statement in each of the cases. Without the
breaks, the statement will continue processing the
Bill,
Here are two suggestions. I know CF variables are typeless butit might help.
Try putting quotes around each case. Eg. CASE "1":... CASE "2":.. and so on.
Also you might want to place each case within {}s. Eg. CASE
1":{ COPY_BLOCK...; ...TITLE="whatever"; }
Hope this helps.
Leong
PS: I've
42 matches
Mail list logo