When using a CFSET tag, you only need the variable part if you want to
capture the result of the function/expression. So, if you were adding 2
numbers, you'd want to have the variable as in:
<CFSET sum = 5 + 2>
But if the function directly modifies one of its arguments and you don't
need to use the result of the function later in your code, you can leave out
the variable assignment as in:
<CFSET QuerySetCell(...)>
--
Mosh Teitelbaum
evoch, LLC
Tel: (301) 942-5378
Fax: (301) 933-3651
Email: [EMAIL PROTECTED]
WWW: http://www.evoch.com/
> -----Original Message-----
> From: Mark W. Breneman [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 10, 2003 4:50 PM
> To: CF-Talk
> Subject: RE: Is there a good way to do this?
>
>
> To be honest, I was not sure if I needed to or not. I thought
> about it for
> a sec and decided that I was sure it would work with the temp variable.
>
> Is there a rule of thumb to when you have to use a temp var for
> doing stuff
> like that. I found some function last week that required me to
> make a temp
> var. (Well maybe it was the version of CF server that forced that.)
>
> Mark W. Breneman
> -Macromedia Certified ColdFusion Developer
> -Network / Web Server Administrator
> Vivid Media
> [EMAIL PROTECTED]
> www.vividmedia.com
> 608.270.9770
>
> -----Original Message-----
> From: Chris Kief [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, June 10, 2003 3:26 PM
> To: CF-Talk
> Subject: RE: Is there a good way to do this?
>
>
> Why even create the temp variable??
>
> <cfset QuerySetCell(...)>
>
> chris
>
>
>
> >-----Original Message-----
> >From: S. Isaac Dealey [mailto:[EMAIL PROTECTED]
> >Sent: Tuesday, June 10, 2003 1:14 PM
> >To: CF-Talk
> >Subject: Re: Is there a good way to do this?
> >
> >You weren't too far off...
> >
> ><cfoutput query="getreg" >
> > <cfloop index="i" list="#columnlist#">
> > <cfset temp= QuerySetCell(getreg,i,
> > replace(getreg[i][currentrow],"'",
> > "''","all"),currentrow)>
> > </cfloop>
> ></cfoutput>
> >
> >Sorry for the wrap...
> >
> >> I need to replace all single quotes with double single
> >> quotes in all of the
> >> fields of a query. I know that I could do it in a query
> >> but in this case I
> >> am opting not to.
> >
> >
> >> I have come up with this idea of but I am having a problem
> >> with the "i[x]"
> >> part. Any ideas?
> >
> >> <cfoutput query="getreg" >
> >> <cfset x=0 >
> >> <cfloop index="i" list="#columnlist#">
> >> <cfset temp= QuerySetCell(getreg, i, replace(i[x],"'",
> >> "''","all"), x ) >
> >> <cfset x=x+1 >
> >> </cfloop>
> >> </cfoutput>
> >
> >
> >
> >> Mark W. Breneman
> >> -Macromedia Certified ColdFusion Developer
> >> -Network / Web Server Administrator
> >> Vivid Media
> >> [EMAIL PROTECTED]
> >> www.vividmedia.com
> >> 608.270.9770
> >
> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >> ~~~~~~~~~~~|
> >> Archives:
> >> http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
> >> Subscription: http://www.houseoffusion.com/cf_lists/index.
> >> cfm?method=subscribe&forumid=4
> >> FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
> >
> >> This list and all House of Fusion resources hosted by
> >> CFHosting.com. The place for dependable ColdFusion
> >> Hosting.
> >> http://www.cfhosting.com
> >
> >> Unsubscribe:
> >http://www.houseoffusion.com/cf_lists/uns
> >> ubscribe.cfm?user=633.558.4
> >
> >
> >
> >
> >s. isaac dealey 972-490-6624
> >
> >new epoch http://www.turnkey.to
> >
> >lead architect, tapestry cms http://products.turnkey.to
> >
> >tapestry api is opensource http://www.turnkey.to/tapi
> >
> >certified advanced coldfusion 5 developer
> >http://www.macromedia.com/v1/handlers/index.cfm?ID=21816
> >
> >
> >
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
http://www.cfhosting.com
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4