RE: cfscript question

2008-08-26 Thread Dave Watts
> 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

RE: cfscript question

2008-08-26 Thread Dave Watts
> 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

Re: cfscript question

2008-08-26 Thread Yuliang Ruan
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

Re: cfscript question

2008-08-26 Thread Scott Stewart
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

RE: cfscript question

2008-08-26 Thread Dave Watts
> 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

Re: cfscript question

2008-08-26 Thread Scott Stewart
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

Re: cfscript question

2008-08-26 Thread Scott Stewart
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

Re: cfscript question

2008-08-26 Thread Brad Wood
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

Re: cfscript question

2008-08-26 Thread Charlie Griefer
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

RE: CFSCRIPT Question

2006-01-03 Thread Andy McShane
: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

RE: CFSCRIPT Question

2006-01-02 Thread Dave Watts
> 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

RE: CFSCRIPT Question

2006-01-02 Thread Bobby Hartsfield
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

Re: CFSCRIPT Question

2006-01-02 Thread Owner, Three Ravens Consulting
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

Re: CFSCRIPT Question

2006-01-02 Thread Charlie Griefer
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:

RE: CFSCRIPT Question

2006-01-02 Thread Andy McShane
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

Re: CFSCRIPT Question

2005-12-30 Thread Aaron Rouse
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 > > ~~~

Re: CFSCRIPT Question

2005-12-30 Thread Ben Doom
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

Re: CFSCRIPT Question

2005-12-30 Thread Adrocknaphobia
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

Re: CFSCRIPT Question

2005-12-30 Thread Andy Mcshane
>> 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

RE: CFSCRIPT Question

2005-12-30 Thread Snake
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

RE: CFSCRIPT Question

2005-12-30 Thread Paul Vernon
> 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/

Re: CFScript question - Queries

2004-12-09 Thread Bert Dawson
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

Re: CFScript question - Queries

2004-12-09 Thread Barney Boisvert
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

Re: CFScript question - Queries

2004-12-09 Thread Bert Dawson
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

Re: CFScript question - Queries

2004-12-08 Thread C. Hatton Humphrey
> 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

Re: CFScript question - Queries

2004-12-08 Thread Michael Dinowitz
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 >

Re: CFScript question - Queries

2004-12-08 Thread Barney Boisvert
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

Re: cfscript question

2004-05-07 Thread Claude Schneegans
>>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

RE: cfscript question

2004-05-07 Thread Barney Boisvert
> > 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]

RE: cfscript question

2004-05-07 Thread Raymond Camden
> > 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,

Re: cfscript question

2004-05-07 Thread Jim McAtee
- 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. >

RE: cfscript question

2004-05-07 Thread Raymond Camden
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

RE: cfscript question

2004-05-07 Thread Nathan Mische
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

RE: cfscript question

2004-05-07 Thread Barney Boisvert
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 >

Re: CFSCRIPT question

2000-08-24 Thread Sharon DiOrio
; 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

Re: CFSCRIPT question

2000-08-24 Thread Sharon DiOrio
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: [

RE: CFSCRIPT question

2000-08-24 Thread Andrea Wasik(CancerSource)
: 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

Re: CFSCRIPT question

2000-08-24 Thread David E. Crawford
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

Re: CFSCRIPT question

2000-08-24 Thread David E. Crawford
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

RE: CFSCRIPT Question

2000-07-10 Thread Zachary Bedell
-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

RE: CFSCRIPT Question??

2000-05-10 Thread Mulcahey, Robert J. (James Tower)
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

RE: CFSCRIPT Question??

2000-05-09 Thread Leong Yew
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