Re: Querying a comma separated list
Back when i used to pack fields with comma delimited strings, i used to do something like this: select * from pgallery where concat(',', gtype,',') like '%,1,%' (add the , to the front and back of the string to test, so the value you want is always ,VAL,) this then only runs one like query, rather than multiple. not sure if it is better, but it was simpler for me to understand hth Jerry Milo Johnson On Tue, Aug 26, 2014 at 8:41 PM, Bill Moniz hydro.b...@gmail.com wrote: I'm pretty certain you can't do what you're trying to do directly. The comma delimited list you have stored in gtype is just a string as far as the DB engine is concerned and cannot be searched as a list. If you must store it this way, I have achieved the result I think you want, in the past, with the following somewhat ugly query: cfquery name=getslides datasource=#dsn# select* from pgallery wheregtype LIKE '1' OR gtype LIKE '1,%' OR gtype LIKE '%,1' OR gtype LIKE '%,1,%' /cfquery Basically this manually searches the string for the four possible positions for your target element in a comma delimited list: 1. Element is the only thing in the list 2. Element begins the list 3. Element ends the list 4. Element is in the list between two other elements Hope that helps. Also I'm basing this on my experience with MS-SQL so apologies if MS-ACCESS actually does provide a way to do this natively. On 27 August 2014 10:32, Jon Clausen jon_clau...@silowebworks.com wrote: listContains() isnât a function of the database but, rather, a CFML function. If youâre storing the list as a string list, and are querying the database, then your query will have to use Access string functions as it doesnât know CFML: http://www.techonthenet.com/access/functions/ HTH, Jon On Aug 26, 2014, at 8:13 PM, te...@it-werks.com te...@it-werks.com te...@it-werks.com wrote: I haven't done this is ages and could use some help, please. Here I define a list of checkboxes of picture types: input type=checkbox name=tt value=1 cfif gtype contains '1'checked/cfifSolidbr input type=checkbox name=tt value=2 cfif gtype contains '2'checked/cfifOpenbr input type=checkbox name=tt value=3 cfif gtype contains '3'checked/cfifInsulatedbr input type=checkbox name=tt value=4 cfif gtype contains '4'checked/cfifCombinationbr At form submit I update the record: cfquery name=upcontent datasource=#dsn# maxrows=1 update pgallery set gtype = '#tt#' where id = #picid# /cfquery Now here's where I screw up: cfquery name=getslides datasource=#dsn# select * from pgallery where listContains(gtype, 1) /cfquery Here;s the error: Error Executing Database Query. [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Undefined function 'listContains' in expression. Terry ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359198 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: The long tail of ColdFusion fail
After days of cringing as these emails come through, I am going to chime in briefly. If there is such a glaring hole in the Coldfusion platform, and there is a need for it to be filled, is there an obvious business/product opportunity here? The Coldfusion ecosystem is large, and as the title suggests, has a really, really long tail. (Says someone who finally shut down his last Coldfusion 5 system last calendar year) Would you people that think it needs work be willing to define the require functionality you think is missing? As in specific vulnerabilities, and suggestions for how to test it? I am sure there are solid developers here who, if they saw a compelling reachable product, might jump on this. And if it turns out to be doable and cost effective, i would also bet that Adobe (or one of their competitors, or both) might purchase that technology and bundle it in future versions. I am picturing a 2-fold system. A web-based scan for common vulnerabilities from outside, and a more detailed scan the system from inside. (There are a number of comparable systems out there. WordPress security scanners being a recently-in-mind example) Thoughts? I think a little more on-topic, a little less on-people would be nice. Jerry Milo Johnson ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358172 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CAN THIS PLEASE BE THE END? Re: The long tail of ColdFusion fail
For the Love of God On Fri, Mar 28, 2014 at 8:30 PM, Maureen mamamaur...@gmail.com wrote: There are people doing that, and their entries are being closed without comment, even when they request comment. So what's the point? Also, QA and debugging are usually paid positions, except for open source software. If Adobe wants to make CF open source, I will be happy to volunteer some time to help fix it. Otherwise, not my job. On Fri, Mar 28, 2014 at 10:38 AM, Steve 'Cutter' Blades cold.fus...@cutterscrossing.com wrote: Review the install of the now public beta. Write down a list of faults/suggestions. Go file it in the bug report tool. Let everyone know that it's there for vote and comment. Everyone then go vote and comment. If you do it right, and you give it full court press, maybe we can get at least partial response before they take the server to full product. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358213 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: WordPress to ColdFusion
There is a filter that gets run on the_content (and the_excerpt), called wpautop https://codex.wordpress.org/Function_Reference/wpautop it looks for 2 carriage returns in a row, and converts them to a p You should be able to either add this to your output (it is actually a pretty good idea ... I do it for all my cf cms content too), or just run a cf script once to go fix them all in the db if you want to solve it once. hth. (I have a pretty good understanding of wp at this point, feel free to hit me up with any questions if you need to) On Sun, Mar 23, 2014 at 2:08 PM, Rick Eidson cfh...@kchost.net wrote: So I have a client that is in a WordPress Site but we are moving to a customized site using ColdFusion. I am going to use the database that WP used. So my problem. The br tag. WordPress's editor will remove the BR tag and it doesn't store it in the database. Now I have done some research to find out how to stop WP from doing this. BUT there are over 2000 post and like I said. we are moving to CF. What I do not understand is when the post is output to the WP site and you look at the source the BR tags are there. They aren't in the database. So obviously they aren't in CF Output either. I do not see any replaced ascii or other in it's place. Somehow it seems the WP knows where the BR tag is supposed to be even though it isn't in the database. Is this confusing? Rick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358071 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: database design conundrum
third field, id of item to be shared. (id in this case being a unique column name)? On Thu, Mar 20, 2014 at 8:33 PM, PT cft...@gmail.com wrote: I have a design issue I can't seem to get my head around. Say I have a table full of users with certain fields containing information they can share with or hide from other users. users_table -- userid thing_to_share_or_not_1 thing_to_share_or_not_2 thing_to_share_or_not_3 ... There are a lot of things The default is to hide. What is the most efficient way to denote that a user is sharing specific info with another user? I immediately thought about a joining table sharing_table -- userid_of_sharer userid_of_user_being_shared_with I can't figure out how to join what specific piece of information is being shared. I thought about including a varchar in the share table with the name of the shared field in it, but, while doable, seems a clumsy hack. What obvious thing am I overlooking? Todd Ashworth Janty Networks ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:358057 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Hosting... Again
I was a CrystalHost devotee for more than a decade, but cannot in good conscience recommend them for anything any more. I too am still looking for a decent cf host. On Fri, Jan 10, 2014 at 8:22 AM, Robert Harrison rob...@austin-williams.com wrote: Hi All, I've got a lot of large CF sites I have to move because my host is not up to what we've grown to be. Love the guy and been with him for years, but now I have to go. I've asked this before (in October), but now that I'm no longer in denial I'm looking for CF hosting recommendations again. I have the previous recommendations which I'm listing below. If anyone has comments about any of the hosts below, or better recommendations, please provide your feedback. I'm about to move a boatload of serous sites. So far, I've gotten recommendations for: Hostek Viviotech CrystalTech http://www.kickassvps.com/ Please let me know if you have additional recommendations or feedback on these hosts. Thanks, Robert ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:357395 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: shots fired in the Capitol
Is there any thought to lining people up for him? Too soon? Apparently the security and police forces are NOT laid off with the shutdown. lesson learned. On Thu, Oct 3, 2013 at 2:34 PM, Bryan Stevenson br...@electricedgesystems.com wrote: Come on Larryyou're a fellow Canuck right - no need for the alarmism ;-) .may be due to a car chase near the Capitol*ahem* Calm everyone...calm - let's wait for facts to roll in ;-) Cheers *Bryan Stevenson*B.Comm. President CEO Electric Edge Systems Group Inc. - makers of FACTS^(TM) phone: 250.480.0642 cell: 250.920.8830 e-mail: br...@electricedgesystems.com mailto: br...@electricedgesystems.com web: www.electricedgesystems.com http://www.electricedgesystems.com and www.fisheryfacts.com http://www.fisheryfacts.com Please consider the environment before printing this e-mail -CONFIDENTIALITY-- This message, including any attachments, is confidential and may contain information that is privileged or exempt from disclosure. It is intended only for the person to whom it is addressed unless expressly authorized otherwise by the sender. If you are not an authorized recipient, please notify the sender immediately and permanently destroy all copies of this message and attachments. On 13-10-03 11:28 AM, Larry C. Lyons wrote: Just saw this on the Washington Post: BREAKING NEWS Capitol locked down after shots fired ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-jobs-talk/message.cfm/messageid:4613 Subscription: http://www.houseoffusion.com/groups/cf-jobs-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-jobs-talk/unsubscribe.cfm
Re: shots fired in the Capitol
and shit just got unfunny. she had a kid in the car with her. On Thu, Oct 3, 2013 at 3:20 PM, Jerry Milo Johnson jmi...@gmail.com wrote: LOL. Reporters emailing the Capital security public relations person are getting automated out of office message, saying she is not in the office due to the appropriations gap. On Thu, Oct 3, 2013 at 3:06 PM, Bryan Stevenson br...@electricedgesystems.com wrote: Good to hear you are away from it! ...and yes...BC politicsgetting WAY worseI don't even recognize BC and Canada anymoregoing down fast and hard If ya ever head this waylook me up *Bryan Stevenson*B.Comm. President CEO Electric Edge Systems Group Inc. - makers of FACTS^(TM) phone: 250.480.0642 cell: 250.920.8830 e-mail: br...@electricedgesystems.com mailto: br...@electricedgesystems.com web: www.electricedgesystems.com http://www.electricedgesystems.com and www.fisheryfacts.com http://www.fisheryfacts.com Please consider the environment before printing this e-mail -CONFIDENTIALITY-- This message, including any attachments, is confidential and may contain information that is privileged or exempt from disclosure. It is intended only for the person to whom it is addressed unless expressly authorized otherwise by the sender. If you are not an authorized recipient, please notify the sender immediately and permanently destroy all copies of this message and attachments. On 13-10-03 12:00 PM, Larry C. Lyons wrote: I'm nowhere near this. I'm on the western edge of the region near the Manassas Battlefield. If I hear gunfire its usually in July with all those Civil War re-enactors. As for corruption, hey isn't it BC? T hat said, its about time to visit the relatives on Vancouver Island again. On Thu, Oct 3, 2013 at 2:55 PM, Bryan Stevenson br...@electricedgesystems.com wrote: No kidding - that's why I live here ;-) Of course it's changing here too - not so dangerousbut lots of corruption It may be time to head further up island where you can still stay away from it all!! Stay safe Larry! Cheers *Bryan Stevenson*B.Comm. President CEO Electric Edge Systems Group Inc. - makers of FACTS^(TM) phone: 250.480.0642 cell: 250.920.8830 e-mail: br...@electricedgesystems.com mailto: br...@electricedgesystems.com web: www.electricedgesystems.com http://www.electricedgesystems.com and www.fisheryfacts.com http://www.fisheryfacts.com Please consider the environment before printing this e-mail -CONFIDENTIALITY-- This message, including any attachments, is confidential and may contain information that is privileged or exempt from disclosure. It is intended only for the person to whom it is addressed unless expressly authorized otherwise by the sender. If you are not an authorized recipient, please notify the sender immediately and permanently destroy all copies of this message and attachments. On 13-10-03 11:49 AM, Larry C. Lyons wrote: Victoria is nothing like DC. I have no problem with going anywhere in Victoria. DC now I would go near some places in South West DC. And this shooting wouldn't be the first time even this year. Some wingnut was arrested just 3 weeks ago in front of the White HOuse with an AR-15 and multiple ammo clips. On Thu, Oct 3, 2013 at 2:34 PM, Bryan Stevenson br...@electricedgesystems.com wrote: Come on Larryyou're a fellow Canuck right - no need for the alarmism ;-) .may be due to a car chase near the Capitol*ahem* Calm everyone...calm - let's wait for facts to roll in ;-) Cheers *Bryan Stevenson*B.Comm. President CEO Electric Edge Systems Group Inc. - makers of FACTS^(TM) phone: 250.480.0642 cell: 250.920.8830 e-mail: br...@electricedgesystems.com mailto: br...@electricedgesystems.com web: www.electricedgesystems.com http://www.electricedgesystems.com and www.fisheryfacts.com http://www.fisheryfacts.com Please consider the environment before printing this e-mail -CONFIDENTIALITY-- This message, including any attachments, is confidential and may contain information that is privileged or exempt from disclosure. It is intended only for the person to whom it is addressed unless expressly authorized otherwise by the sender. If you are not an authorized recipient, please notify the sender immediately and permanently destroy all copies of this message and attachments. On 13-10-03 11:28 AM, Larry C. Lyons wrote: Just saw this on the Washington Post: BREAKING NEWS Capitol locked down after shots fired ~| Order the Adobe
Re: How to learn to build mobile apps..
Phonegap (html5/css/js skillz needed) Titanium (js skillz needed) Native development (2 different environments, one for iDevices, one for Android) if at all possible, I prefer the first. On Fri, Apr 19, 2013 at 1:41 AM, Mike K afpwebwo...@gmail.com wrote: I need to learn how to build mobile apps for iPad/iPhone and Android. I have been building responsive web sites for mobile devices and think I have a reasonable understanding of the issues involved with that, but I have a project coming up that will require a full-on app not just a web site. So here's my question to those of you who build mobile apps ... how would I go about learning this? Is there a course i can take? On line course? Books?Where do i gather the skills? I dont have a tertiary qualification in programming - everything I've learned so far I've picked up along the way, so I have quite a steep learning curve for building mobile apps, I think. Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355504 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: How to learn to build mobile apps..
as for how to learn, it depends on your learning style. all 3 approaches have excellent examples, which is how I learn best, pulling apart other peoples code to understand how it works. all have good training websites, and lots of youtube and slideshow walkthroughs and all have good books, websites, etc. On Fri, Apr 19, 2013 at 1:45 AM, Jerry Milo Johnson jmi...@gmail.comwrote: Phonegap (html5/css/js skillz needed) Titanium (js skillz needed) Native development (2 different environments, one for iDevices, one for Android) if at all possible, I prefer the first. On Fri, Apr 19, 2013 at 1:41 AM, Mike K afpwebwo...@gmail.com wrote: I need to learn how to build mobile apps for iPad/iPhone and Android. I have been building responsive web sites for mobile devices and think I have a reasonable understanding of the issues involved with that, but I have a project coming up that will require a full-on app not just a web site. So here's my question to those of you who build mobile apps ... how would I go about learning this? Is there a course i can take? On line course? Books?Where do i gather the skills? I dont have a tertiary qualification in programming - everything I've learned so far I've picked up along the way, so I have quite a steep learning curve for building mobile apps, I think. Cheers Mike Kear Windsor, NSW, Australia Adobe Certified Advanced ColdFusion Developer AFP Webworks http://afpwebworks.com ColdFusion 9 Enterprise, PHP, ASP, ASP.NET hosting from AUD$15/month ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355505 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Why is this happening??????
what happens if you display the value INSIDE the cfc before you return it? what happens if you set the same variable OUTSIDE the cfc and display it? On Wed, Mar 13, 2013 at 9:23 PM, Rick Faircloth r...@whitestonemedia.comwrote: This has been driving me crazy for two days and I GIVE UP! AHH! If I create this variable in application.cfc: cfset application.temp_images_directory = 'e:\inetpub\webroot\tempImages' / and use it in news.cfc like this: cfset saveNewsItemStruct = structNew() cfset saveNewsItemStruct.ATID = '#application.temp_images_directory#' / why in the WORLD would I get this: e:\\inetpub\\webroot\\tempImages when I return the struct and display saveNewsItemsStruct.ATID? Why are the path lines doubling? I don't think I've seen this in 15 years of CF programming! (I'm getting too old for all this aggravation...) Thanks for any help! Rick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:354999 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Why is this happening??????
how are you displaying it when the \ are appearing doubled? (something like a js alert, or a cfoutput to an html page, or some other mechanism?) On Wed, Mar 13, 2013 at 10:08 PM, Rick Faircloth r...@whitestonemedia.comwrote: If I use this on a test page: cfoutput#application.temp_images_directory#/cfoutput it comes out fine: e:\inetpub\webroot\tempImages I just don't see why (or how) it could be happening. Thanks for the feedback! Rick -Original Message- From: Jerry Milo Johnson [mailto:jmi...@gmail.com] Sent: Wednesday, March 13, 2013 9:34 PM To: cf-talk Subject: Re: Why is this happening?? what happens if you display the value INSIDE the cfc before you return it? what happens if you set the same variable OUTSIDE the cfc and display it? On Wed, Mar 13, 2013 at 9:23 PM, Rick Faircloth r...@whitestonemedia.com wrote: This has been driving me crazy for two days and I GIVE UP! AHH! If I create this variable in application.cfc: cfset application.temp_images_directory = 'e:\inetpub\webroot\tempImages' / and use it in news.cfc like this: cfset saveNewsItemStruct = structNew() cfset saveNewsItemStruct.ATID = '#application.temp_images_directory#' / why in the WORLD would I get this: e:\\inetpub\\webroot\\tempImages when I return the struct and display saveNewsItemsStruct.ATID? Why are the path lines doubling? I don't think I've seen this in 15 years of CF programming! (I'm getting too old for all this aggravation...) Thanks for any help! Rick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355002 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Adobe Abandons Flex
I miss Spectra. Lots of expensive training lost in a moment. But working in WordPress brings back lots of memory of containers, and late nights tweaking nesting rules. Sigh. But a Flex question. If Adobe stops any further development on Flex, how likely is it that an open source group might continue to develop it? Jerry Milo Johnson On Tue, Nov 15, 2011 at 5:13 PM, Dave Watts dwa...@figleaf.com wrote: The abandonment of Spectra was accompanied by a rosy news release and claims of This is fantastic news! Spectra quickly died. That was fantastic news! (not a Spectra fan here, but j/k I guess) Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348736 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Determine the length of an MP3 file...
I had this bookmarked, but have never tried it. http://coldfused.blogspot.com/2008/02/reading-mp3-meta-data-from-coldfusion.html On Tue, Jun 7, 2011 at 3:05 PM, Rick Faircloth r...@whitestonemedia.com wrote: Does anyone know how to use CF, Javascript, or jQuery, in particular, to determine the length of an .mp3 file that is sitting on my server? It's not something that is uploaded, but is created on-the-fly from a text file and I need to be able to dynamically determine the length of the audio file... not the file size, but the duration. Thanks! Rick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:345117 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: decimals and variables
divide tx by 100 before using, rather than trying that trick with the decimal point. (this will also work better for the value of 4, which in your example would evaluate to .40 rather than .04. Jerry Milo Johnson On Thu, Feb 10, 2011 at 9:14 AM, Rick Sanders c...@webenergy.ca wrote: Hey all, I'm pulling up an integer from the database which is 15. This is a tax rate, so I need to get the tax on the subtotal. Say the #subtot# is 100 and #tx# is 15. cfset tax = #subtot# * .#tx# This should bring back the number 15. However, cf is throwing an error because of the decimal in front of the #tx#. cfset tax = #subtot# * .15 This works. However I need to pull from the database in case the tax rate changes. Rick ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342099 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Need 2nd pair of eyes: why doesn't this code work?
isDefined(attributes.year) in quotes? Jerry Milo Johnson On Fri, Jan 28, 2011 at 9:01 AM, Dave Burns cft...@burnsorama.com wrote: I'm having one of those moments where something seemingly trivial isn't working. I'm sure I'm missing something obvious. I have a custom tag that takes and attribute named year and outputs the number of years since then. So, my test.cfm looks like this: cf_yearsSince year=1970 I'd expect that to output 41. I tried to be smart though and put code in the custom tag to detect whether year was passed in and if not, output an error. It didn't work and it boils down to my use of IsDefined on the attribute. Here's the current code for the tag: cfdump var=#ATTRIBUTES# cfif isDefined(ATTRIBUTES.year)year is definedcfelseyear is NOT Defined/cfif cfoutput#year(now()) - ATTRIBUTES.year#/cfoutput When you run it, the cfdump line shows that the attributes scope contains a value named YEAR. The 2nd line though says that year is NOT defined. But the 3rd line works anyway. So, what am I doing wrong in the 2nd line re testing that the attribute exists? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341619 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Need 2nd pair of eyes: why doesn't this code work?
Just point to the time, and claim lack of caffeine. Plus, it is Friday. You are officially off the hook. Jerry Milo Johnson On Fri, Jan 28, 2011 at 9:07 AM, Dave Burns cft...@burnsorama.com wrote: Sigh. FML. Thank you. Now, how to delete this thread or at least remove my name from it? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341622 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm