RE: Is there a good way to do this?
One word - CFSCRIPT Also, when you refer to a cell in a query with square brackets it's Query[Field][Row] So it'd be GetReg[i][x] From: Mark W. Breneman [mailto:[EMAIL PROTECTED] 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 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Is there a good way to do this?
I haven't tried it, so take this with a grain or three of salt, but 2 things stand out: 1) Start x at 1, not 0, and 2) You probably have to use the Evaluate() function around the i[x] bit as in: replace(Evaluate(getreg.#i#[#x#]),', '',all) Again, untested. -- 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 3:52 PM To: CF-Talk Subject: Is there a good way to do this? 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=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
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=subscribeforumid=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 dealey972-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=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Is there a good way to do this?
Actually, either way would work. Both of the following produce the same result: QueryName.ColumnName[RowNumber] QueryName[ColumnName][RowNumber] I had forgotten about this second format which is a good way of getting around having to use Evaluate(). -- Mosh Teitelbaum evoch, LLC Tel: (301) 942-5378 Fax: (301) 933-3651 Email: [EMAIL PROTECTED] WWW: http://www.evoch.com/ -Original Message- From: Philip Arnold [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 4:01 PM To: CF-Talk Subject: RE: Is there a good way to do this? One word - CFSCRIPT Also, when you refer to a cell in a query with square brackets it's Query[Field][Row] So it'd be GetReg[i][x] From: Mark W. Breneman [mailto:[EMAIL PROTECTED] 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 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Is there a good way to do this?
Thank you! I knew it was something simple like that. Yes, CFSCRIPT is how I should do it. Mark W. Breneman -Macromedia Certified ColdFusion Developer -Network / Web Server Administrator Vivid Media [EMAIL PROTECTED] www.vividmedia.com 608.270.9770 -Original Message- From: Philip Arnold [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 3:01 PM To: CF-Talk Subject: RE: Is there a good way to do this? One word - CFSCRIPT Also, when you refer to a cell in a query with square brackets it's Query[Field][Row] So it'd be GetReg[i][x] From: Mark W. Breneman [mailto:[EMAIL PROTECTED] 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 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Is there a good way to do this?
One word - CFSCRIPT Why? Outside of having a structtoquery() function... Also, when you refer to a cell in a query with square brackets it's Query[Field][Row] So it'd be GetReg[i][x] From: Mark W. Breneman [mailto:[EMAIL PROTECTED] 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 s. isaac dealey972-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=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
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=subscribeforumid=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 dealey972-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=subscribeforumid=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
RE: Is there a good way to do this?
I haven't tried it, so take this with a grain or three of salt, but 2 things stand out: 1) Start x at 1, not 0, and 2) You probably have to use the Evaluate() function around the i[x] bit as in: replace(Evaluate(getreg.#i#[#x#]),', '',all) Again, untested. This should work, but is probably not the best way to handle it. The # around x in this string aren't necessary, in other words evaluate(getreg.#i#[x]) would also work... x however is a duplication of the getreg.currentrow variable, so all the stuff to manipulate x can go away... and you can use array notation for both dimension of the query which makes the evaluate() unnecessary overhead, so getreg[i][currentrow] also works. hth s. isaac dealey972-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=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Is there a good way to do this?
One word - CFSCRIPT Why? Speed and WhiteSpace I know CFMX levels the speed between CF tags and CFSCRIPT but it's easier to read and easier if the code is running on CF5 and CFMX As for WhiteSpace, I know that CFSETTING can get rid of that, but most people tend to not use it... ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=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
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=subscribeforumid=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 dealey972-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=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Is there a good way to do this?
Oops... forgot to remove the temp= ... heh. :) 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=subscribeforumid=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 dealey972-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=subscribeforumid=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 dealey972-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=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Is there a good way to do this?
One word - CFSCRIPT Why? Speed and WhiteSpace I know CFMX levels the speed between CF tags and CFSCRIPT but it's easier to read and easier if the code is running on CF5 and CFMX As for WhiteSpace, I know that CFSETTING can get rid of that, but most people tend to not use it... Ahh... Whitespace I'd agree with... I was under the impression that differences in speed between cfscript and tags had been debunked in CF5. Personally I don't find cfscript any easier to read. s. isaac dealey972-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=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Is there a good way to do this?
Guess it needs to be taken with 4 grains of salt 8^). -- Mosh Teitelbaum evoch, LLC Tel: (301) 942-5378 Fax: (301) 933-3651 Email: [EMAIL PROTECTED] WWW: http://www.evoch.com/ -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 4:28 PM To: CF-Talk Subject: RE: Is there a good way to do this? I haven't tried it, so take this with a grain or three of salt, but 2 things stand out: 1) Start x at 1, not 0, and 2) You probably have to use the Evaluate() function around the i[x] bit as in: replace(Evaluate(getreg.#i#[#x#]),', '',all) Again, untested. This should work, but is probably not the best way to handle it. The # around x in this string aren't necessary, in other words evaluate(getreg.#i#[x]) would also work... x however is a duplication of the getreg.currentrow variable, so all the stuff to manipulate x can go away... and you can use array notation for both dimension of the query which makes the evaluate() unnecessary overhead, so getreg[i][currentrow] also works. hth s. isaac dealey972-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=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Is there a good way to do this?
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=subscribeforumid=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 dealey972-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=subscribeforumid=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
RE: Is there a good way to do this?
That seems too simple. :-) Did it work that way in CF 3? (The ver I learned cf in) I seem to remember needing the variable part regardless of what you were doing, just to be valid syntax. Mark W. Breneman -Macromedia Certified ColdFusion Developer -Network / Web Server Administrator Vivid Media [EMAIL PROTECTED] www.vividmedia.com 608.270.9770 -Original Message- From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 4:19 PM To: CF-Talk Subject: RE: Is there a good way to do this? 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=subscribeforumid=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 dealey972-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=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Is there a good way to do this?
IIRC, this was new to CF5. Doug -Original Message- From: Mark W. Breneman [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 5:34 PM To: CF-Talk Subject: RE: Is there a good way to do this? That seems too simple. :-) Did it work that way in CF 3? (The ver I learned cf in) I seem to remember needing the variable part regardless of what you were doing, just to be valid syntax. Mark W. Breneman -Macromedia Certified ColdFusion Developer -Network / Web Server Administrator Vivid Media [EMAIL PROTECTED] www.vividmedia.com 608.270.9770 -Original Message- From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 4:19 PM To: CF-Talk Subject: RE: Is there a good way to do this? 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=subscribeforumid=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 dealey972-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=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Is there a good way to do this?
I tend to salt everything to taste. heh. :) Guess it needs to be taken with 4 grains of salt 8^). -- Mosh Teitelbaum evoch, LLC Tel: (301) 942-5378 Fax: (301) 933-3651 Email: [EMAIL PROTECTED] WWW: http://www.evoch.com/ -Original Message- From: S. Isaac Dealey [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 4:28 PM To: CF-Talk Subject: RE: Is there a good way to do this? I haven't tried it, so take this with a grain or three of salt, but 2 things stand out: 1) Start x at 1, not 0, and 2) You probably have to use the Evaluate() function around the i[x] bit as in: replace(Evaluate(getreg.#i#[#x#]),', '',all) Again, untested. This should work, but is probably not the best way to handle it. The # around x in this string aren't necessary, in other words evaluate(getreg.#i#[x]) would also work... x however is a duplication of the getreg.currentrow variable, so all the stuff to manipulate x can go away... and you can use array notation for both dimension of the query which makes the evaluate() unnecessary overhead, so getreg[i][currentrow] also works. hth s. isaac dealey972-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=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Host with the leader in ColdFusion hosting. Voted #1 ColdFusion host by CF Developers. Offering shared and dedicated hosting options. www.cfxhosting.com/default.cfm?redirect=10481 Unsubscribe: http://www.houseoffusion.com/cf_lists/uns ubscribe.cfm?user=633.558.4 s. isaac dealey972-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=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Is there a good way to do this?
I'm pretty sure CF4 had it, because I recall doing struct(Delete|Insert|Update) calls without a lvalue in the tag, but that might have been CF4.5. --- Barney Boisvert, Senior Development Engineer AudienceCentral (formerly PIER System, Inc.) [EMAIL PROTECTED] voice : 360.756.8080 x12 fax : 360.647.5351 www.audiencecentral.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 2:38 PM To: CF-Talk Subject: RE: Is there a good way to do this? IIRC, this was new to CF5. Doug -Original Message- From: Mark W. Breneman [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 5:34 PM To: CF-Talk Subject: RE: Is there a good way to do this? That seems too simple. :-) Did it work that way in CF 3? (The ver I learned cf in) I seem to remember needing the variable part regardless of what you were doing, just to be valid syntax. Mark W. Breneman -Macromedia Certified ColdFusion Developer -Network / Web Server Administrator Vivid Media [EMAIL PROTECTED] www.vividmedia.com 608.270.9770 -Original Message- From: Mosh Teitelbaum [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 4:19 PM To: CF-Talk Subject: RE: Is there a good way to do this? 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=subscribeforumid=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 dealey972-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