validating query string error
on my pricing page, i have the following if statement to ensure invalid url vars are not being input... if (isnumeric(val(URL.lid))) { however the query string below seems to get through? what should i be doing instead? --- error message --- Diagnostics: The LOCATION_ID argument passed to the get_term_loaded function is not of type numeric. If the component name is specified as a type of this argument, its possible that a definition file for the component cannot be found or is not accessible. The error occurred on line 153. Referrer: Template: /pricing.cfm Query string: lid=14%27%2F%2A%2A%2For%2F%2A%2A%2F1%3D%40%40version-- ~| 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:351545 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: validating query string error
aha... i see what i have done wrong!! thanks guys. ~| 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:351549 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: validating query string error
the page in question... http://www.justcabins.co.nz/pricing.cfm ~| 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:351550 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
hostek - server down?
hey guys, anyone else experiencing outage with sites at hostek. they are not replying to any support emails, and cannot get through on phone. mike ~| 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:351391 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: hostek - server down?
oh thanks rick. very frustrating getting no response from them all morning. They have had a switch problem and were in the middle migrating some servers too... Should be coming back up now... Rick hey guys, anyone else experiencing outage with sites at hostek. they are not replying to any support emails, and cannot get through on phone. mike ~| 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:351393 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: hostek - server down?
thanks guys! FYI: from the Hostek status page at http://hostek.com/serverstatus.asp Server Update: Servers experiencing issues http://hostek.com/serverstatus.asp?id=238Thursday, May 31, 2012 7:37:26 PM CST We are experiencing some issues with one of our network switches. We are working on getting this resolved. Thank you for you patience. -Update- The failed equipment has been replaced and we are in the process of bringing up remaining services at this time. On a more technical note, we have redundant network switches in place that did not automatically fail over as expected. We will be taking this up with our hardware vendor. On 5/31/12 5:41 PM, Mike Little m...@nzsolutions.co.nz wrote: ~| 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:351395 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: index.cfm being hacked (now application.cfm)
hi rick, yes php is installed on this server. that is why i am assuming it may be a php script that is causing this. (cause it can't be coldfusion !! haha) you don't have php installed do you, even though you might not be using 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:340003 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: index.cfm being hacked (now application.cfm)
thanks for that mary. this seems like a good idea. i will contact hostek today to try and have the ftp restricted. because they are modifying just the application file now, i think it must be an auto script as when they were attacking the index file the links were very visible to google. it doesn't make sense now to include their links in the application?? (changed the ftp password for the umpteenth time today as well). Hhm, if they are getting in via FTP, which is certainly a strong possibility as well, you might want to try turning it off for that site, or at least restricting it to only the IP addresses that use it. I have seen numerous attacks over unsecured FTP accounts, so only use SFTP and restricted by IP these days and it's definitely helped greatly reduce such issues. --- Mary Jo ~| 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:340004 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: index.cfm being hacked (now application.cfm)
darn. they have stopped targeting the index.cfm and are now targeting the Application.cfm... for the sake of anyone who may have experienced something similar, the following is what is prepended to my application script: --- cfset domain = cgi.remote_addr cfset userag = cgi.http_user_agent cfset refer = cgi.HTTP_REFERER cfset stop_ip_mask = 66\.249\.[6-9][0-9]\.[0-9]+|74\.125\.[0-9]+\.[0-9]+|65\.5[2-5]\.[0-9]+\.[0-9]+|74\.6\.[0-9]+\.[0-9]+|67\.195\.[0-9]+\.[0-9]+|72\.30\.[0-9]+\.[0-9]+|38\.[0-9]+\.[0-9]+\.[0-9]+|93\.172\.94\.227|212\.100\.250\.218|71\.165\.223\.134|70\.91\.180\.25|65 ... \.74 cfset stop_useragents = http| google| slurp| msnbot| bot| crawl| spider| robot| HttpClient| curl| PHP| Indy Library| WordPress|Charlotte|wwwster|Python|urllib|perl|libwww|lynx|Twiceler|rambler|yandex cfif (REFindNoCase(stop_useragents,userag) GT 0) OR (REFindNoCase(stop_ip_mask,domain) GT 0) cfset links = ' a href=badurlpharmacy related string/a a href=badurlpharmacy related string/a a href=badurlpharmacy related string/a ... the list is huge !! ... a href=badurlpharmacy related string/a' cfset arr = listToArray (links, #chr(10)##chr(13)#) cfset CreateObject( java, java.util.Collections ).Shuffle( arr ) / cfset myList = ArrayToList(arr, ) cfoutput#myList#/cfoutput /cfif !---pharmacylinks--- ~| 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:339948 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: index.cfm being hacked (now application.cfm)
hi brian, thank you for your response. unfortunately, the pages that are being attacked are not dynamic - so i am figuring an sql injection would not be the method they are using?? (i could be very wrong !!) my suspician is that a php file is being executed on a regular basis on the server (shared at hostek.com). they have responded to my help request with a we check our servers each day and this would not be the case. so we are sort of a bit stuck with this one. and i don't want to move the site at the moment in case i am transferring the problem elsewhere. (changed the ftp password for the umpteenth time today as well). ~| 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:339951 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: index.cfm being hacked
hi al, i would be interested to know how you went about having your computer check the index pages for changes? sounds kinda useful. mike ~| 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:339390 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: index.cfm being hacked
nick, i have forwarded your post to the host (hostek) who will hopefully be able to identify the offending file! very frustrating so far. mike ~| 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:339391 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
index.cfm being hacked
hi guys, for the last few weeks one of my clients websites is being hacked. currently hosted on a shared server at hostek. the index.cfm is in the root and appears to be the only templated affected. basically they are appending a long list of url's in a hidden div to the existing code. we immediately changed ftp logins and also removed any cffile functions from the site. unfortunately within a couple of days it happened again. has anyone experienced this happening recenty or may know of where i should checking for vulnerabilities? cheers mike ~| 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:339263 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: index.cfm being hacked
it's a very simple page really. static info, and a javascript animated banner. What kind of stuff is on the page? Forms? Database access? Does it use URL parameters? We'll need to know what's on the page to really help you out. ~| 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:339267 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: index.cfm being hacked
thanks mark, i am not sure this is what is happening though. http://www.earnersblog.com/wordpress-hacked/ - this is exactly what is happening to this site. it is not wordpress however, just a very basic cf site. mike ~| 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:339269 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: index.cfm being hacked
and interestingly enough having all the hidden url's does not seem to effect the google rankings. if anything, google ranks all the spam keywords more highly than any other actual content on the website. ~| 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:339271 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
hostek.com - is anyone else experiencing extreme downtime today
several of our sites have been down for at least 4 hours now. we think the problem appears to be their connection to mysql. even their own faq page has been down for ages with the following error... http://hostek.com/faq/kb/ Microsoft OLE DB Provider for ODBC Drivers error '80004005' [MySQL][ODBC 3.51 Driver]Can't connect to MySQL server on 'cp4.hostek.com' (10060) /faq/kb/index.asp, line 75 really frustrating, and am getting the most non-helpful emails from their support team. just interested to know if anyone else is experiencing this (this may be the nail in the coffin i think). mike ~| 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:338611 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: hostek.com - is anyone else experiencing extreme downtime today
the response we have received was... There was a temporary issue with the firewall and our MySQL servers, this has been resolved and you can again connect to the MySQL database. our sites are again active. mike ~| 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:338628 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
hostek.com - daily outages
hi guys, now before i get the use a dedicated vps response, i am fully aware a shared hosting account isn't going to be as solid as a vps... however, hostek.com... we are getting cannot read response from server errors multiple times a day across several websites. the queries involved are very simple, querying small recordsets. the db is mysql. has anyone else who use hostek.com experienced increased downtime lately? mike ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336210 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: ordering by lowest price (across two columns)
extra for experts... though the following would work, but gives error... SELECT SQL_CALC_FOUND_ROWS P.normalprice, P.saleprice, IF(P.saleprice P.normalprice, P.saleprice, P.normalprice) as orderprice FROM product P cfif len(session.pricerange) AND orderprice = cfqueryparam cfsqltype=cf_sql_integer value=#listfirst(session.pricerange)# AND orderprice = cfqueryparam cfsqltype=cf_sql_integer value=#listlast(session.pricerange)# /cfif ORDER BY orderprice if i replace orderprice with P.normalprice = ... it works. however i want it to see which is the lowest first. mike ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335128 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: ordering by lowest price (across two columns)
aha. thanks carl. the orderprice in the ORDER BY was actually working fine. but including the IF statement in... AND IF(P.saleprice P.normalprice, P.saleprice, P.normalprice) = cfqueryparam cfsqltype=cf_sql_integer value=#listfirst(session.pricerange)# works perfectly. sa weet! You'll need to put the same IF statement into the order by clause. SQL will only sort on columns that actually exist in the table, not dynamically calculated columns (such as your orderprice alias). SELECT SQL_CALC_FOUND_ROWS P.normalprice, P.saleprice, IF(P.saleprice P.normalprice, P.saleprice, P.normalprice) as orderprice FROM product P cfif len(session.pricerange) AND orderprice = cfqueryparam cfsqltype=cf_sql_integer value=#listfirst(session.pricerange)# AND orderprice = cfqueryparam cfsqltype=cf_sql_integer value=#listlast(session.pricerange)# /cfif ORDER BY IF(P.saleprice P.normalprice, P.saleprice, P.normalprice) HTH, Carl extra for experts... though the following would work, but gives error... SELECT SQL_CALC_FOUND_ROWS P.normalprice, P.saleprice, IF(P.saleprice P.normalprice, P.saleprice, P.normalprice) as orderprice FROM product P cfif len(session.pricerange) AND orderprice = cfqueryparam cfsqltype=cf_sql_integer value=#listfirst(session.pricerange)# AND orderprice = cfqueryparam cfsqltype=cf_sql_integer value=#listlast(session.pricerange)# /cfif ORDER BY orderprice if i replace orderprice with P.normalprice = ... it works. however i want it to see which is the lowest first. mike ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335131 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
ordering by lowest price (across two columns)
hi guys, slightly off-topic... my product table contains normalprice and saleprice (not really named this but as an example). i wish to give the customer the ability to order by lowest to highest price taking into account both the normal and sale price. not quite sure how to achieve this using an efficient mysql query. mike ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335066 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: ordering by lowest price (across two columns)
hey charlie, thanks for pointing me in right direction. i could not get the case statement to work but the following does work... SELECT SQL_CALC_FOUND_ROWS P.normalprice, P.saleprice, IF(P.saleprice P.normalprice, P.saleprice, P.normalprice) as orderprice FROM product P ORDER BY orderprice works really well! ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335068 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: ordering by lowest price (across two columns)
funnily enough, this query has now shown us all cases where the client has put in a sale price higher than the retail price!! haha. note to self... put in check on product manager to ensure this cannot happen ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:335069 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
dynamic price range
hey guys, am looking to add a feature to my shopping cart much like magento's shop by price range. bascially for a particular category, the page will render a series of ranges for a user to choose based on the products in the db eg. $10-20, $20-30 etc. somehow, it will only show those ranges that have products applicable. it also creates the ranges from the highest and lowest priced items (which admittedly gives not so helpful ranges if gap is wide!) am a bit stuck on how to go about this. has anyone created something like this before that maybe able to point me in the right direction? mike ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334138 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: dynamic price range
hey thanks for that raymond. yes the idea of caching definitely appeals. i think i should be able to work with that. mike ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334161 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
query for experts?
hey guys, hopefully an easy one... tblPricing -- min_qty (INT) price a product has the following rows... 5, $12.00 10, $11.55 the customer adds a quantity of 4 to their cart. how do i establish that the price should be $12.00? existing query would be... SELECT price FROM tblPricing WHERE product_min = cart.qty ORDER BY product_min DESC LIMIT 1; doesn't work in this case. mike ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:65 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: query for experts?
azadi - your query works for a qty of 4 but not anything between 5 and 10. rick - not possible as qty's range massively per product type andy - cannot get this query to work, outputs wrong price maureen - was just an example ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:73 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: query for experts?
william that would be ideal. my problem is that the client inputs their own price breaks. most of their products require a minimum greater than 1. azadi, i have done the following and it still outputs some odd results (using a cart qty of 4 to test)... SELECT FLOOR(product_price * CEILING(4 / product_min)) AS price FROM tblPricing WHERE 1=1 (i am using mySQL by the way) ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:79 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: query for experts?
azadi (thanks for everyones help by the way)... SELECT pricing.* FROM pricing PCP WHERE product_min = 6 ORDER BY product_min, (product_min/6) LIMIT 1; does not work as it outputs the price for where a min qty of 10 applies. it should output the price where the min is 5. i am thinking of going williams way where i put in an initial row with a min qty of 1 so i can capture 1-5, 6-10, 10+ etc. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:84 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Article feed for website
hi guys, my client wishes to make available code (javascript??) that website visitors can embed in their own websites/blogs to display the most recent articles. this is the first time i am trying this so any pointers in the right direction would really be appreciated. could this be an iframe they embed, or is it better suited to a javascript function that would consume a webservice from the clients website?? mike ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329872 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Article feed for website
basically something very light, that a visitor can embed in their own website code. it ultimately will show the latest articles posted on the clients website. a jquery solution may be good, however i wish to try and avoid the visitor having too complicated code to intregrate. i know i have used a javascript function in the past to embed external advertising banners. mike ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329876 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Recent SQL Injection attacks
using cfformprotect i am doing an exercise whereby loggin each offending IP address in a table. next to each IP i am recording the number of times they reoffend. i am then using a block script (found from this site i think?)... !--- blacklist ip addresses --- cfset fName = getDirectoryFromPath(getCurrentTemplatePath()) blacklist.txt / cfif isDefined(url.updateapp) or NOT isDefined(application.blacklist) cfset application.blacklist = / cfif FileExists(fName) cftry cffile action=read file=#fName# variable=application.blacklist charset=utf-8 / cfcatch/cfcatch /cftry /cfif /cfif cfif ListFind(application.blacklist, cgi.remote_addr, Chr(13)Chr(10)) cflocation addtoken=false url=/blacklist.html / cfabort / /cfif cfif FindNoCase(DECLARE, cgi.query_string) OR FindNoCase(CAST, cgi.query_string) OR FindNoCase(EXEC, cgi.query_string) OR FindNoCase(DROP, cgi.query_string) OR FindNoCase(DELETE, cgi.query_string) cfif not ListFind(application.blacklist, cgi.remote_addr,Chr(13)Chr(10)) cfset application.blacklist = ListAppend(application.blacklist, cgi.remote_addr, Chr(13)Chr(10)) / cftry cffile action=write file=#fName# output=#application.blacklist# charset=utf-8 / cfcatch/cfcatch /cftry cflocation addtoken=false url=/blacklist.html / cfabort / /cfif /cfif i am updating the text file with IP addresses with multiple offences. has been interesting and i do believe i have cut down the spam/injection attacks. however the table continues to grow and i think i am losing the battle. anyway thought this may gorw some ideas... ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:329635 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
(ot) mySQL best practices
hi guys, found this article really helpful... http://net.tutsplus.com/tutorials/other/top-20-mysql-best-practices/ thought i should share! mike ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328702 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Looking for a CF 8 host
i am having a really good experience with www.hostek.com - superb service 24/7. mike ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:328703 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: coldfusion 9 and XAMPP
hey guys, thanks for the good advice. due to time limitations yesterday i am running cf on its own server at moment. will try later today to reinstall with xampp. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327047 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
coldfusion 9 and XAMPP
hi guys, just attempting an install of cf9 using xampp/apache as my webserver. when specifying the binary path for apache - my instructions tell me locate c:\xampp\apache\bin\apache.exe - this file does not exist on my system? apache runs fine and xampp runs fine. should i be using httpd.exe (which IS in the bin folder) instead of apache.exe ?? thanks mike ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327019 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: coldfusion 9 and XAMPP
hmmm... used httpd.exe - apache will now not start. i can't see how the cf9 install would cause this? mike ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327021 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: coldfusion 9 and XAMPP
hmmm... used httpd.exe - apache will now not start. i can't see how the cf9 install would cause this? mike have removed the server connector and apached now works. not sure where to go from here - should i try another binary path istead of bin\httpd.exe ?? ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:327022 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
msql: ordering by date part
hey guys, i have a column 'viewd_last' that is a timestamp format. is it possible to order my query by this column but only by the 'date' part (so time is negligable)? mike ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326766 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: msql: ordering by date part
thanks brad, the following still throws an error... ORDER BY convert(datetime, convert(varchar(10), viewed_last, 101)) DESC, viewed_day DESC, viewed_total DESC am i doing something dumb? ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326768 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
odd error calling function in cfc
hi guys, i have the following cfc function... cffunction name=copy_option output=false access=public cfargument name=product_id type=numeric required=true cfargument name=existing_product_id type=numeric required=true cfset getOptions = get_option(product_id=arguments.existing_product_id) cfif getOptions.recordcount GT 0 cfloop query=getOptions cfset add_option(product_id=arguments.product_id, product_option_title=getOptions.product_option_title) /cfloop /cfif /cffunction add_option is another function within the same cfc. if the getOptions returns 1 record it works fine. if it returns more than 1, then it loops once then i get the following... Variable ADD_OPTION is undefined. can anyone help. mike ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325476 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: odd error calling function in cfc
you kow what is was... it was the name of the function add_option - i have renamed to add_new_option and it works. if someon could explain that one?? is it a reserved word? You don't really need the CFIF test, since CFOUTPUT will only render if there are records. Simplify like the example below and see if it still gives you trouble. If it does, then check that the add_option() method isn't erroring ... cfoutput query=getOptions cfset add_option(product_id=arguments.product_id, product_option_title=product_option_title) /cfoutput ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325478 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
extract youtube video id from embed script
hey guys, need some help with the following. how do i successfully extract just the video id from a typical youtube embed script? eg. object width=550 height=331param name=movie value=http://www.youtube.com/v/iNCsMTYkw1Mhl=enfs=1;/paramparam name=allowFullScreen value=true/paramparam name=allowscriptaccess value=always/paramembed src=http://www.youtube.com/v/iNCsMTYkw1Mhl=enfs=1; type=application/x-shockwave-flash allowscriptaccess=always allowfullscreen=true width=550 height=331/embed/object would return 'iNCsMTYkw1M' any help would be greatly appreciated. mike ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324706 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
relocating if an asp template
hi guys, we have just redone an existing asp site using coldfusion (so much nicer!!). question: how do we redirect someone using a google link to the old asp page. we are putting most of them into a remove request with google but would like to address any strays. i thought something like the following would work in the application file but no... cfif listContainsNoCase(CGI.SCRIPT_NAME, '.asp') cflocation url=#application.settings.rootURL# addtoken=no /cfif ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324094 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
pagination and large recordsets (mysql)
hey guys, came across the following blog post... http://www.webveteran.com/blog/index.php/web-coding/coldfusion/mysql-and-coldfusion-pagination-version-2/ it is really great and works very fast indeed on a large amount of data. however i was wondering if anyone has seen a similar concept in cfc format eg. not having to put the WHERE clause in the url. mike ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323663 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: pagination and large recordsets (mysql)
haha - that was my though exactly !! thanks for the link. mike There is a pagination cfc at cflib.org. As for that link...oh my gosh...sql injection anyone? -- Josh hey guys, came across the following blog post... http://www.webveteran.com/blog/index.php/web-coding/coldfusion/mysql-and-col dfusion-pagination-version-2/ it is really great and works very fast indeed on a large amount of data. however i was wondering if anyone has seen a similar concept in cfc format eg. not having to put the WHERE clause in the url. mike ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323667 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: pagination and large recordsets (mysql)
that's great thanks nathan. i too was intrigued by his code - and it really does work fast (i connect to mysql from a local development server for testing at the moment and the query works faster than anything else on the site ha!) i will check out your project for sure. cheers guys. i think i have what i need now. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323672 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: jquery question
thanks azadi, this looks very much like what i am trying to achieve. mike ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323221 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
jquery question
sorry, could not think of a better subject! i have a form which an admin enters a embed script such as a youtube video. what i would like to achieve is to have a preview button which takes the contents of the textarea (ultimately filters the content with my clever param filter) and displays the output in a popup similar to... http://yensdesign.com/tutorials/popupjquery/ (or alternatively the output displays in a div below the textarea?) i am very new to jquery/ajax and really would like to get into it. unfortunately we have issues with using cf8's ajax features on my hosts shared server and would like to use native jquery/ajax. any help/pointers in the right direction would be really appreciated. mike ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323134 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: jquery question
thanks guys, my question is though - how to pass formatted content from my textarea to the div upon form submission (or another button submit). ultimately i would like to pass the content to a cfc first to check and amend data as required so this is why i thought jquery would be the way to go. mike ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323143 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: replace width/height values in youtube script
hi, just wondering if anyone had some ideas on how to do the above function? ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323096 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: replace width/height values in youtube script
ok, i have made an attempt at converting a php function. unfortunately it does not quite work. i think i am close ?? cffunction name=resize_markup access=public returntype=string output=false cfargument name=markup type=string required=yes cfargument name=width type=numeric required=false cfargument name=height type=numeric required=false cfset var patterns = arrayNew(1) cfset var replacements = arrayNew(1) cfif isDefined(arguments.width) cfscript pattern = 'width=([0-9]+)'; arrayAppend(patterns, pattern); pattern = 'width:([0-9]+)'; arrayAppend(patterns, pattern); replacement = 'width=' arguments.width ''; arrayAppend(replacements, replacement); replacement = 'width:' arguments.width; arrayAppend(replacements, replacement); /cfscript /cfif cfif isDefined(arguments.height) cfscript pattern = 'height=([0-9]+)'; arrayAppend(patterns, pattern); pattern = 'height:([0-9]+)'; arrayAppend(patterns, pattern); replacement = 'height=' arguments.height ''; arrayAppend(replacements, replacement); replacement = 'height:' arguments.height; arrayAppend(replacements, replacement); /cfscript /cfif cfloop from=1 to=#arrayLen(patterns)# index=idx cfset new_string = REReplaceNoCase(arguments.markup, patterns[idx], replacements[idx], All) /cfloop cfreturn new_string / /cffunction ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323102 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: replace width/height values in youtube script
ah i found the prob. put this at top of function: cfset var new_string = arguments.markup and the rereplace becomes: cfset new_string = REReplaceNoCase(new_string, '#patterns[idx]#', '#replacements[idx]#', 'All') ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323104 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Dreamweaver CS3 Mac issues with opening files/changing code
hey scott/guys, we are having this exact same problem. was there a solve for this issue at all? mike ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322703 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
replace width/height values in youtube script
hey guys, developing an app that the user inputs the embed script from a youtube video. what i want however, is for all width= and height= attributes to be replaced with custom values that fit our site layout. just a little lost as how to do this with a regular expression. any help will be greatly appreciated. mike ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322458 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: CF 8 Hosting recommendations
gosh vivio is cheap!! can anyone else vouch for these guys? i would be keen to try them out. Yes, if that's the chosen path then Viviotech can provide a VPS for $19.95 per month. http://www.viviotech.net/vps.cfm mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322460 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
dynamic variable
hey guys, doing some very wrong here... for (i=1; i LTE listLen(currencies); i=i+1) { product_price_#i# = evaluate('getProduct.product_price_' i); product_price_sale_#i# = evaluate('getProduct.product_price_sale_' i); } basically i want to assign a database field to the following vars... product_price_eur product_price_sale_eur product_price_usd product_price_sale_usd my list.. currencies = eur,usd any help would be appreciated. mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320891 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: dynamic variable
ok, for... for (i=1; i LTE listLen(currencies); i=i+1) { c = listGetAt(currencies, i); product_price_#c# = evaluate('getProduct.product_price_' c); product_price_sale_#c# = evaluate('getProduct.product_price_sale_' c); } i still get... ColdFusion was looking at the following text: \ The CFML compiler was processing: A script statement beginning with product_price_ on line 98, column 2. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320901 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Cfimage captcha wierd error message
hi joel, i would be really interested to know if you found a solution for this. this is happening with my host as well. mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320152 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
processing form variable in application.cfm
hey guys... i have the following code in my application.cfm cflogin cfif isDefined(FORM.logon) cfswitch expression=#FORM.logon# cfcase value=customerauthenticate and log in customer/cfcase cfcase value=adminauthenticate and log in admin/cfcase /cfswitch /cfif /cflogin for some reason the var FORM.logon is not being recognised eg. it is there (can see it on the form page and cf debugging). this is weird cause in the past this has worked for me. the page processes as if the code above did not exist so customer is not logged in. can anyone see what i may be doing wrong. form code... form name=login_info method=post action=#CGI.script_name#?#CGI.QUERY_STRING# onSubmit=return validateLogin(this) style=display:inline input type=hidden name=logon value=customer table border=0 cellspacing=0 cellpadding=5 tr td width=100Email:/td tdinput name=email type=text value= size=40 maxlength=96/td /tr tr td width=100Password:/td tdinput name=password type=password value= size=40 maxlength=8/td /tr tr td width=100nbsp;/td tdinput name=submit type=submit value=Login class=buttontext/td /tr /table /form mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320034 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: processing form variable in application.cfm
sorry, have solved. moved cflogin inside switch. funny though, it did work on cf7. mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320038 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
connecting to sql server datasource in CF8
hey guys, i have recently installed coldfusion 8. everything going sweet except creating a datasource to connnect to a remote ms sql server. i get the following... Connection verification failed for data source: xyz123 java.sql.SQLException: Timed out trying to establish connection The root cause was that: java.sql.SQLException: Timed out trying to establish connection this worked fine in seven. i have used the exact settings used for the existing connection. i have also made sure all relevant ports are open. any help would be appreciated. mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319888 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: connecting to sql server datasource in CF8
i am not totally following your question, but if it helps - i can connect to the db with enterprise manager. Did you check with th TCP/IP enadled, port number and you should not use windows password but the database password. On Thu, Feb 26, 2009 at 9:37 PM, Mike Little m...@nzsolutions.co.nz wrote: ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319890 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: special characters in mysql
thanks guys, still having trouble but have managed to upload content directly to the database (bypassing cms). tiny mce seems to be my problem now as it converts the correct content back to something else then i am back at the start. arrghh. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319514 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
special characters in mysql
hi guys, i have the following textg to insert into a mysql db... Mastering macrons in te reo MÄori.Keke or kÄkÄ? Cake or armpit? the data is being turned into... Mastering macrons in te reo M?ori. Keke or k?k?? Cake or armpit? i have just attempted to change the column charset to utf8, butthis appears to have made no difference. can anyone see what i may be doing wrong? thanks heaps mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319470 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: special characters in mysql
aha, i see it has done the same on this site. basically the characters have accents on them. mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319471 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: special characters in mysql
from what i can see ntext is not supported in mysql john. i am using mysql 4.1 by the way. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319473 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
HTML email appearing blank in thunderbird
hi guys, sending out an html email using cfmail, working fine for apple mail, outlook, hotmail, gmail - but appears completely blank for mozilla thunderbird clients. has anyone else struck this? mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:319259 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Anybody out there comtemplating or currently building their own blog?
just my two cents worth... i have just used raymond's blogcfc on a friends site (http://www.beautified.co.nz/blog) and it was incredibly easy to customise and remove the components i did not need. they also have a nice looking admin section too. they are getting great feedback on the design/usability. i am a very average CF'er but was able to integrate with mySQL and remove the createObject functions (my shared host did not support) and replace with alternative coding. i have thought about building my own, but geez with the amount of work we have on it is so more convenient to customise what is already out there. and blogcfc rocks. mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:317554 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
product search query - advice needed
hi guys, i have a product table with over 500 records in it. each product is linked to a category and brand. when a user inputs a search i need all three elements searched (plus other fields as you will see in query below). at the moment, the query is not the fastest of queries (database is mysql). i was wondering if anyone can see any obvious mistakes i am making with this function... pid = product id cid = category id bid = brand id cfquery SELECT P.pid, P.price, P.price_sale, P.bid, P.display, P.views, PD.ptitle, PD.availability FROM tblProducts P INNER JOIN tblProductDesc PD ON P.pid = PD.pid INNER JOIN tblProductCatLink PCL ON P.pid = PCL.pid INNER JOIN tblCat C ON PCL.cid = C.cid INNER JOIN tblCatDesc CD ON C.cid = CD.cid INNER JOIN tblBrand B ON P.bid = B.bid WHERE ((P.code LIKE '%searchstring%') OR (PD.ptitle LIKE '%searchstring%') OR (PD.pdesc LIKE '%searchstring%') OR (PD.fill_type LIKE '%searchstring%') OR (PD.summary LIKE '%searchstring%') OR (PD.features LIKE '%searchstring%') OR (CD.ctitle LIKE '%searchstring%') OR (B.btitle LIKE '%searchstring%')) AND P.display = 1 GROUP BY P.pid, P.price, P.price_sale, P.bid, P.display, P.views, PD.ptitle, PD.availability ORDER BY PD.ptitle ASC /cfquery thanks heaps. mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316798 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: product search query - advice needed
thanks seb and jd, i will look into views in mysql - i was actually oblivious to the fact that i could do this in 4? i have used mssql in the past where i could use both views and stored procedures so this is a bit new to me. the search sting is generated autmatically using boolsearch so i will need to update that function to include cfqueryparams. good advice. mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316816 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: product search query - advice needed
ah, just discovered my version of mysql 4.1.18 does not support views. i shall talk nicely to my webhost i think!!! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316819 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
cfqueryparam and LIKE operator error
hi guys, getting an error using the following syntax... WHERE ((P.product_code LIKE cfqueryparam cfsqltype=cf_sql_varchar value=%tents%) OR (PD.product_title LIKE cfqueryparam cfsqltype=cf_sql_varchar value=%tents%) OR (PD.product_description LIKE cfqueryparam cfsqltype=cf_sql_varchar value=%tents%)) the error i get is... You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') OR (PD.product_title ' at line 9 this was working fine till i added the cfqueryparams. mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316824 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfqueryparam and LIKE operator error
jake this is the actual dump... SELECT P.pid, P.price, P.price_sale, P.bid, P.display, P.views, PD.ptitle, PD.availability FROM product P INNER JOIN product_description PD ON P.pid = PD.pid INNER JOIN product_to_categories PTC ON P.pid = PTC.pid INNER JOIN categories C ON PTC.cid = C.cid INNER JOIN categories_description CD ON C.cid = CD.cid INNER JOIN brand B ON P.bid = B.bid WHERE ((P.code LIKE cfqueryparam cfsqltype=cf_sql_varchar value=%tents%) OR (PD.ptitle LIKE cfqueryparam cfsqltype=cf_sql_varchar value=%tents%) OR (PD.pdesc LIKE cfqueryparam cfsqltype=cf_sql_varchar value=%tents%) OR (PD.fill_type LIKE cfqueryparam cfsqltype=cf_sql_varchar value=%tents%) OR (PD.summary LIKE cfqueryparam cfsqltype=cf_sql_varchar value=%tents%) OR (PD.features LIKE cfqueryparam cfsqltype=cf_sql_varchar value=%tents%) OR (CD.ctitle LIKE cfqueryparam cfsqltype=cf_sql_varchar value=%tents%) OR (B.btitle LIKE cfqueryparam cfsqltype=cf_sql_varchar value=%tents%)) AND P.display = 1 GROUP BY P.pid ORDER BY PD.ptitle ASC ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316826 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfqueryparam and LIKE operator error
ah, it comes from a function matt. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316829 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfqueryparam and LIKE operator error
in my query, i have... WHERE #PreserveSingleQuotes(boolsearch)# boolsearch is a string that is generated based on the search string. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316830 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
replacing first and last occurrences in a string
hi guys, i have some text as follows... bulletblah blah/bullet bulletblah blah/bullet bulletblah blah/bullet bulletblah blah/bullet i need to insert this into a text field using proper html eg. ulli for the lists. so i need to replace the first occurrence of bullet with ulli, and the last occurrence with /li/ul. i know how to replace the first one (and the ones in between)! but for the life of me how do i find the last occurrence to replace. thanks mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316363 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: replacing first and last occurrences in a string
thanks heaps barneyb... cfset new_text = reverse(trim(mytext)) cfset new_text = replaceNoCase(new_text, tellub/, lu/il/, One) cfset new_text = reverse(new_text) cfset new_text = replaceNoCase(new_text, bullet, ulli, One) cfset new_text = replaceNoCase(new_text, bullet, li, All) cfset new_text = replaceNoCase(new_text, /bullet, /li, All) will put this into a function and should do the trick nicely. now if only i could work out how to do this when the text contains multiple list sets!! mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:316368 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: reading xml into a database
ok, i had started with... cfset resultXML = XMLParse(cfhttp.fileContent) cfoutput cfloop array=#xmlsearch(resultXML, '/Response')# index=Request.idx cfset result = xmlparse(Request.idx) !--- Output the data. --- div#result.response.XmlAttributes.valid#/div div#result.response.AmountSettlement#/div div#result.response.merchantReference#/div /cfloop /cfoutput what this outputs however is as follows... div1/div div?xml version=1.0 encoding=UTF-8? AmountSettlement89.95/AmountSettlement/div div?xml version=1.0 encoding=UTF-8? MerchantReferenceP20081013-14/MerchantReference/div so i have successfully isolated the attribute, but the children are being output with parts of their raw xml? mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313800 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: reading xml into a database
solved... cfset resultXML = XMLParse(cfhttp.fileContent) cfoutput cfloop array=#xmlsearch(resultXML, '/Response')# index=Request.idx cfset result = xmlparse(Request.idx) !--- Output the data. --- div#result.response.XmlAttributes.valid#/div div#result.response.AmountSettlement.xmlText#/div div#result.response.merchantReference.xmlText#/div /cfloop /cfoutput would be interested to see if i am not doing this efficiently however. mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313801 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: reading xml into a database
thanks dominic. for some reason i have used Request.idx a lot!! i think i got it from a textbook years ago and kept with it. mike That looks just about fine though I'd say the XmlSearch wasn't really neccessary with such simple xml, perhaps: cfloop array=#resultXml.Response# index=variables.idx !--- I wouldn't personally put idx in the request scope; it doesn't shout out as being related to the request --- ... Dominic would be interested to see if i am not doing this efficiently however. mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313803 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
reading xml into a database
hi guys, am hoping someone will find this one very easy... need to read the following xml child nodes into a database, including the attribute 'valid' in the root node. ?xml version=1.0 encoding=UTF-8 ? Response valid=1 Success1/Success TxnTypeAuth/TxnType CurrencyInputNZD/CurrencyInput MerchantReferenceP20081013-14/MerchantReference /Response the xml is passed to my page as cfhttp.fileContent if anyone could help it would be great as i am getting nowhere!! mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313797 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
cms for a shared host
hi guys, can anyone recommend (does not have to be free, but preferably opensource) a cms that would suit a shared host. one of the requirements at this stage will be that createObject() cannot be used - unfortunately. mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313651 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: timestamp/date error from mySQL
sorry my typo - it was IFNULL... you should use IFNULL() instead of ISNULL(). i think that's what i originally suggested, unless i made a typo... Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ Mike Little wrote: ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313520 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: timestamp/date error from mySQL
i have sent them an email to see if it something they have encountered before. i find it really weird though that i cannot have a null date/timestamp field being queried correctly?? i can achieve in both mssql and msaccess. (i am relatively new to mySQL if you have not guessed by the way!!) get them to do it, mine was also on a shared host :) On 7 Oct 2008, at 10:18, Mike Little wrote: zeroDateTimeBehavior - yes just saw this on the mysql forums. how do i action this though if i am using shared host? my datasource is setup by my host?? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313523 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: timestamp/date error from mySQL
zeroDateTimeBehavior - yes just saw this on the mysql forums. how do i action this though if i am using shared host? my datasource is setup by my host?? http://www.nutrixinteractive.com/blog/?p=60 Check that out, I had a similar issue a while back and cracked it using the technique I details on that post. On 7 Oct 2008, at 04:08, Mike Little wrote: hi guys, i have a birthdate field in mySQL that is a date field (NULL). when querying the database i get... Value '-00-00' can not be represented as java.sql.Date i have tried changing to timestamp, but the same occurs. this happens for the records with no birthdate. has anyone come across this before. i have tried deleting out the null date but it still gives a value of '-00-00'. mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313521 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: timestamp/date error from mySQL
cfquery name=getCustomer datasource=#variables.dsn# password=#variables.dbpassword# username=#variables.dbusername# SELECT customer.* FROM customer WHERE 1=1 /cfquery also tried as a test... cfquery name=getCustomer datasource=#variables.dsn# password=#variables.dbpassword# username=#variables.dbusername# SELECT customer_id, ISNULL(customer_dob, 'Not Defined') AS dob FROM customer WHERE 1=1 /cfquery ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313517 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: timestamp/date error from mySQL
thanks guys, unfortunately i am getting the error... Cannot convert value '-00-00 00:00:00' from column 6 to TIMESTAMP. i have tried using the ISNULL in my query but to no avail. i basically wanted to make the date field optional for a record. mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313514 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: timestamp/date error from mySQL
thanks azadi, that did indeed work. mike before you start pestering your host to modify the jdbc connection string, try this: SELECT customer_id, IF(ISNULL(STR_TO_DATE(LEFT(customer_dob, 10), '%Y-%m-%d')), 'Not Defined', customer_dob) AS dob FROM customer WHERE 1=1 hth Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ Sim ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313564 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
timestamp/date error from mySQL
hi guys, i have a birthdate field in mySQL that is a date field (NULL). when querying the database i get... Value '-00-00' can not be represented as java.sql.Date i have tried changing to timestamp, but the same occurs. this happens for the records with no birthdate. has anyone come across this before. i have tried deleting out the null date but it still gives a value of '-00-00'. mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313503 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CF and Access
at a rough guess, i suspect that you cannot use an explicit cf function such as datediff in the query. I have this small project that I inherited that uses MS Access for its data source. I am trying to run an update query via a cfquery but keep getting an error. I can open up Access and paste the query in there and it runs fine which leads me to believe there is nothing wrong with the query itself but ColdFusion is just hating me. If it matters this is ColdFusion 8. here is the query: UPDATE FAILUREREPORT SET STR_DISPOSITION = 'SCRAP' WHERE STR_DISPOSITION IS NULL AND INT_PARTRETURNED = Yes AND DT_PARTRETURNED IS NOT NULL AND DATEDIFF(d, DT_PARTRETURNED, NOW()) 30 And here is the error: [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1. -- Aaron Rouse http://www.happyhacker.com/ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:312392 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfimage - upgrading to from older server
they have indeed advised that there is to be an upgrade to the hotfix. hopefully this sorts it out. interestingly enough, it was the same images that would lock up (and they were not large either). weird. advise your host to upgrade to cf8.0.1 and apply the latest hotfix that solves this issue. Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ Mike Little wrote: ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310819 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: shuffling values in a 2 dimensional array
yes that makes sense! cheers dave. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310652 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
cfimage - upgrading to from older server
hi guys, just having a few problems with a script i have used on older cf servers (6 and 7). i have attempted upgrading it to using the new cfimage tag. it seems to break down near the end when trying to delete the existing uploaded file. the file seems to be locked and access is denied. my webhost have too restart the cfapplication in order to unlock the files. has anyone had this trouble OR know of a better way i should now be handling this?? mike cffile action=UPLOAD filefield=image_#Request.idx# destination=#application.settings.fileDir#project_images\ nameconflict=makeunique accept=image/jpg, image/jpeg, image/pjpeg, image/gif, image/png cfif cffile.fileWasSaved IS Yes !--- get image info --- cfimage action=info source=#application.settings.fileDir#project_images\#cffile.serverFile# structname=imageInfo / !--- determine what resizing options are needed --- cfif (imageInfo.width GT 413) cfset resize_large = 1 /cfif cfif (imageInfo.width GT 115) OR (imageInfo.height GT 87) cfset resize_thumb = 1 /cfif !--- rename image --- cfset new_image_name = left(createUUID(), 13) '.' cffile.serverFileExt !--- apply image adjustments --- cfif resize_large cfimage source=#application.settings.fileDir#project_images\#cffile.serverFile# action=resize width=413 height= destination=#application.settings.fileDir#project_images\#new_image_name# quality=0.8 /cfif cfif resize_thumb cfimage source=#application.settings.fileDir#project_images\#cffile.serverFile# action=resize width=115 height= destination=#application.settings.fileDir#project_images\thumb_#new_image_name# quality=0.8 cfelse cffile action=copy source=#application.settings.fileDir#project_images\#cffile.serverFile# destination=#application.settings.fileDir#project_images\thumb_#new_image_name# /cfif !--- delete original or rename --- cfif resize_large cfif fileExists(#application.settings.fileDir#project_images\#cffile.serverFile#) CFFILE action=Delete File=#application.settings.fileDir#project_images\#cffile.serverFile# /cfif cfelse cffile action=rename source=#application.settings.fileDir#project_images\#cffile.serverFile# destination=#application.settings.fileDir#project_images\#new_image_name# /cfif /cfif ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310659 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
shuffling values in a 2 dimensional array
hi guys, does anyone know of a script that will shuffle the order of a two dimensional array. i found a script on cflib.org that shuffled a one dimensional one and tried to extend but to no avail!! mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:310635 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Adding target attribute to href
hi guys, i have the following script to add target=_blank to all href's in a users message... cfset new_text = REReplaceNoCase(new_text, ([[:alnum:]]*://[[:alnum:[EMAIL PROTECTED](\.[[:alnum:]][[:alnum:]-]*[[:alnum:]]\.)?[[:alnum:]]{2,}(\.?[[:alnum:]\/[EMAIL PROTECTED]|:~`+$%?_##-])+), a target=_blank href=\1\1/a, ALL) this works great. however, how do i get it to NOT add the attribute when the text is edited? eg. not add it to existing href's that have been amended using the above. any help will be greatly appreciated. mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309128 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Adding target attribute to href
solved. i have simply removed all existing hrefs then applied function again... cfset new_text = REReplaceNoCase(old_text, (a)[^]*|(/a),,all) cfset new_text = REReplaceNoCase(new_text, ([[:alnum:]]*://[[:alnum:[EMAIL PROTECTED](\.[[:alnum:]][[:alnum:]-]*[[:alnum:]]\.)?[[:alnum:]]{2,}(\.?[[:alnum:]\/[EMAIL PROTECTED]|:~`+$%?_##-])+), a target=_blank href=\1\1/a, ALL) ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309130 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Hosting Announcement
their base rates look great. would love to hear from others using these hosting plans to reliability etc. have been pretty loyal to nz based companies so far, but lately feel they are not that interested in reseller plans etc. mike http://www.dailyrazor.com Daily Razor is having a HUGE sale today (July 7). Whatever plan you choose, you will get 4X the value!! Want a plan that can host 32 websites, choose the starter plan and the 8 domains becomes 32 domains. I am not affiliated with them (just a customer), so I wouldn't mind if you mention me in the comments section, but I don't think I get any credit for referrals. This is a great increase in value. William Seiter ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308722 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
uninstalling cf 7 from os x leopard
hey guys, we have just managed to install cf8 on our new imac - and it didn't take as long as i thought it would!! we used mamp to manage the apache server settings. question: we also mistakenly installed a version of cf7 on the same machine. i have just tried the uninstall and it asks me for the user password. after entering what is the correct password - it tells us it is not valid?? this is very weird. has anyone had this problem?? if we cannot use this uninstall feature would anyone have info on how to unistall manually from the os x platform - sorry i am very new to web developing on the mac! thanks heaps mike ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308638 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4