RE: ColdFusion sightings in D/FW Area...
Word game geek here is guessing Dallas/Fort Worth. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 09, 2006 3:05 PM To: CF-Jobs-Talk Subject: RE: ColdFusion sightings in D/FW Area... Where is D/FW? I assume it isn't around where I am because I don't reconize the area, but I have some people I can ask if you tell me where it is. :) Original Message: - From: Dave Phillips [EMAIL PROTECTED] Date: Wed, 9 Aug 2006 14:02:39 -0500 To: cf-jobs-talk@houseoffusion.com Subject: ColdFusion sightings in D/FW Area... Hi all, I would like to know if there have been any CF sightings in the D/FW area. I have not seen many jobs or contracts for that area, yet it is such a large metropolitan area. Anyone know of any companies there using CF ? Thanks! Sincerely, Dave Phillips WebTech Staffing, LLC [EMAIL PROTECTED] (402) 896-8801 ~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Jobs-Talk/message.cfm/messageid:3087 Subscription: http://www.houseoffusion.com/groups/CF-Jobs-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.11
CFX tag error
Hi, there. I am creating my first Java CFX tag, and I am getting the following error: PullNTID (Unsupported major.minor version 49.0) null The error occurred on line 1. (PullNTID is the name of the class.) Any thoughts? TIA, Matthieu ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236236 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: usability skills
I think that there are three things here: 1) Talent for seeing problems and their solutions in user interfaces. 2) Experience with designing/fixing user interfaces. 3) Knowledge of theories/abstract concepts related to user interfaces. Number 1 may be overrated; I think that Number 2 tends to be more important. Cognitive psych folks (I majored in this myself) would likely get a boost from their education in numbers 2 and 3. I think that number 3 can (but will not necessarily) give you a great boost in handling problems. Regardless, the bottom line is that no individual from any one group (psychologists, porn surfers, programmers, plumbers) is necessarily going to be better than an individual from another group simply because of the group to which they belong. This sort of thing has driven me a little crazy in computer-related work. I am a generalist and a tinkerer. I don't have a degree in computer science or certification in this or that. When I came to New York several years ago, I would go through these interviews where people would say, Well, we are looking for someone with a degree in Switch-Throwing, or someone with a degree in Lever-Pulling, or someone with a degree in Knob-Turning. Do you have any of those degrees? Of course I don't, and the interview would end, despite the fact that two weeks into the job, I might very well be able to do all three as well as anyone with any of those degrees. In the past, I had worked with tons of people who had these degrees in past jobs, and my experience was that they were not so special. They might know the model numbers of every switch made, or cool jargon for the action of throwing the switch, but when it came down to it, they could only throw particular switches under the particular circumstances for which they had been trained. I was often stunned by how rigidly these folks would think, when the answer was (forgive the cliché) just outside the walls of the box. The problem seems especially great because of the relationship between techies and the rest of the world: if I am non-technical and interviewing a techie, I don't know what to ask in order to really elucidate the person's skills. So I ask if they have a degree in Button-Pressing. Oops. That turned into a bit of a rant. But hey, let's turn it cheery and constructive: how do those of us--I am guessing there are a lot more of you out there like me--whose greatest skill is general problem-solving and not specialization in one particular technical area market ourselves? I have a little consulting thing on the side where I try to market myself as a generalist. I've ended up doing the weirdest combination of tasks, some of which I had never done before taking the job, and I have been getting word-of-mouth business from people, but it's only word-of-mouth. Is that the answer? Is this the only way to sell this skill? Or does this problem-solving ability boil down into a nice phrase like Thingamajig-Operating? I'm not kidding: does anyone out there know of a name for this? Thanks, Matthieu -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: Friday, March 17, 2006 12:57 PM To: CF-Jobs-Talk Subject: RE: usability skills My 8 year old brother is just as qualified as any psyche major at informing someone of what should be changed in an application to make it more 'user friendly'. Saying cognitive psychology has a lot to do with usability is like saying breathing is necessary to live. I don't know anyone who went to college and majored in breathing that came out claiming their degree gave them the knowledge to change the way everyone else breathes. It's a label on the way people supposedly 'think' based on past experience and it's complete BS to assume everyone thinks the same way because their uncle did odd things to them or they have to move their mouse 5 more pixels to the left. I bet there are a ton of porn surfers out there that are WAAAYY better suited for recommending usability changes than psychologists. Why? Because they surf the web one handed ...:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Larry C. Lyons [mailto:[EMAIL PROTECTED] Sent: Friday, March 17, 2006 10:02 AM To: CF-Jobs-Talk Subject: Re: usability skills Cognitive Psychology has a lot to do with usabilty , especially my area, attention and information processing. Where do you think this stuff came from in the first place? On 3/17/06, Bobby Hartsfield [EMAIL PROTECTED] wrote: 'bout as much as psych ..:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Judith Dinowitz [mailto:[EMAIL PROTECTED] Sent: Friday, March 17, 2006 6:11 AM To: CF-Jobs-Talk Subject: Re: usability skills I'm happy for you, Bobby. But what does that have to do with usabilitiy skills? (curious) Judith - Original Message - I slept at a Holiday
Pulling NT ID using ColdFusion
All, I run a site using ColdFusion MX7 on a Unix box. It is an intranet site, accessible only to people within the company who have logged on to the network using their NT ID. Some coworkers of mine (who run ColdFusion sites on NT boxes) are able to have their CF apps pull that NT ID for use in various ways. But, as I said, I run on Unix. So, the question: Does anyone know how to get a ColdFusion MX7 app running on a Unix box to pull the NT ID under which the current user logged into the NT network? Is this possible? Thanks, Matthieu ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234856 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: SQL Problem
Mark, I'd try this: SELECT TOP 1 (controlID, memberID, memberSubmitDate) FROM tblList ORDER BY memberSubmitDate DESC HTH, Matthieu ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:234884 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: SQL Update
Aaron, I Googled MySQL concatenation operator and eventually came to the CONCAT function, pasted below. I think searching for DB_SOFTWARE concatenation operator should help others find their db-specific answers as well. HTH, Matthieu CONCAT(str1,str2,...) Returns the string that results from concatenating the arguments. May have one or more arguments. If all arguments are non-binary strings, the result is a non-binary string. If the arguments include any binary strings, the result is a binary string. A numeric argument is converted to its equivalent binary string form; if you want to avoid that, you can use an explicit type cast, as in this example: SELECT CONCAT(CAST(int_col AS CHAR), char_col); CONCAT() returns NULL if any argument is NULL. mysql SELECT CONCAT('My', 'S', 'QL'); - 'MySQL' mysql SELECT CONCAT('My', NULL, 'QL'); - NULL mysql SELECT CONCAT(14.3); - '14.3' From some MySQL online manual: http://dev.mysql.com/doc/refman/5.0/en/string-functions.html ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:230124 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Decimal
Depends on what you mean by this. If you are looking for a test of whether it is an integer versus a real number with non-zero digits after the decimal point, then you can use this: CFIF Variables.MyVar = Int (Variables.MyVar !--- Variables.MyVar is an integer. --- CFELSE !--- Variables.MyVar is NOT an integer. --- /CFIF HTH, Matthieu -Original Message- From: Stuart Kidd [mailto:[EMAIL PROTECTED] Sent: Friday, January 13, 2006 9:01 AM To: CF-Talk Subject: Decimal Hi guys, Is there any way to check whether my variable is in fact a decimal? Thanks, Saturday ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229508 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Calculate schedule timeslots
Well, you have a bigger problem than that. Let's take your example, where--after someone selects a start time of 11:45 AM and a finish time of 12:45 PM--you change your start time list to: 11:30AM 01:00PM What if the person selects 11:30 AM (completely valid), and then selects an end time of 12:00 PM, because they want a (completely valid) 30 minute time slot? If you have a variable length of appointment, then you are always going to have this problem; in more general terms, it is impossible to know for sure whether a start time is valid without also knowing the duration of the appointment desired. Likewise, it is impossible to know for sure whether an appointment length is valid without also knowing the desired start time. You could start by asking for the day and then the duration of appointment the user wants. Then you could figure out all of the possible start times during that day for an appointment of that duration. The logic of this last step depends a lot on how you store the data, I guess. But you can rely on this generalized idea: A start time ST on a day is valid for a given duration D if ST + D = the next already used start time greater than ST. HTH, Matthieu -Original Message- From: Andy Mcshane [mailto:[EMAIL PROTECTED] Sent: Thursday, January 12, 2006 8:46 AM To: CF-Talk Subject: Calculate schedule timeslots I am sure that I saw something a while back that may address the issue I have. I have a scheduler that has time slots in increments of 15 minutes. What I need to do is to be able to exclude time slots that have already been allocated. For example I have start and end time dropdown lists so a user can select a time slot as follows; Start time : 11:45 AM Finish Time : 12:45PM Once this time slot has been allocated I need to be able to exclude this range from both of dropdown list i.e. Start time will now look as follows 11:30AM 01:00PM End time will be same. I already have the logic to ensure that the start and end time are not the same and also that the end time is after the start time but I am struggling to figure out how edit my dropdowns on the fly as time slots are allocated. Anybody help? Maybe a more simple method would be to only initially populate the start time dropdown and use the onchange method to populate the end time box? Would this be easier do you think? ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229513 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: OT: Eclipse is the One Ring?
I just learned about eclipse recently, and I love it. I am curious, though, as to whether there is a plug-in that allows the sort of visual HTML layout editing that Dreamweaver does. You see, I am too cheap to buy Dreamweaver at home. Is there an eclipse plug-in (I've looked through and not found anything) or some other good, free, opensource software that people can recommend for this part of web work? Thanks, Matthieu -Original Message- From: Munson, Jacob [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 10, 2006 1:11 PM To: CF-Talk Subject: RE: OT: Eclipse is the One Ring? LOL, yeah I guess if you follow the logic through from the books, then that would be the correct conclusion. But really this was just a silly diversion. I currently use Eclipse with CFEclipse, EPIC for perl, JSEclipse for JavaScript, and XMLBuddy. So I would be very upset if Eclipse were destroyed. ;) ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229515 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Verity and Coldfusion MX
Mark, In the ColdFusion documentation, take a look at the key parameter for the CFINDEX tag. Here is some of the info: The value specified for key depends on the type attribute: If type = file, the directory path and filename for the file, If type = path, the directory path for the location of the files. If type = custom, a unique identifier that specifies the location of the data, For a query, the name of the column that holds the primary key, for example. If not a query, an identifier such as the URL for a web page, for example. I haven't used this all that much, but here is the way that I understand it. You set up the collection using CFCOLLECTION. Then you use CFINDEX to index that existing collection. When you set up the index, you have the parameter named key which stores a way to get the person back to the place where the search term was found. In my case, I run this on a database table where I want to return the row from that table if it matches in the search. So, I set the type parameter to custom, and then set the key parameter to the column name for my table's primary key. When the search results come up, I create a series of links using this primary key (as included within the query object returned). Each link then goes to a page that pulls up that table row based on the primary key passed. In your case, you can use type=file to return the path of the file, or (as the documentation suggests), a URL. This all depends on your exact set-up, though. If you have more questions, contact me off-list. HTH, Matthieu -Original Message- From: Mark Murphy [mailto:[EMAIL PROTECTED] Sent: Sunday, January 08, 2006 11:25 PM To: CF-Talk Subject: Verity and Coldfusion MX Howdy, I'm new to Coldfusion - and am looking at the product for work, where we have a trial version of verity Ultraseek. I know that coldfusion has a component of Verity and I have set up collection, searched on this, and am generally happy with the results - Except it won't open the files! I have noticed that the MS office docs 2003, pdf5+ don't seem to be supported - which seems odd, given that I get results, so it does index them - it just won't open the document to view them. I keep getting an error saying it can't locate the doc. Am I missing something? Is there a workaround, somehow. Thanks, Mark ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229518 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: FW: Outputiing dynamic columns
Russ, All right. Let me take a shot. First off, I don't think I really understand the ins and outs of your data, but the formatting issues remind me of a problem that I had outputting data, so I'll punt: Generally stated, you have data that is grouped by some geographic area. Within each geographic area group, you have one or more values, each applying to a particular factor. A given factor may have data within one geographic area group, but not within another. If all that is right, then read on. You pull the data and group it. You then either run a separate query or loop over the initial query to pull all unique values for factor that appear at least once in the query, regardless of the number of appearances. You order that list however you like (alphabetical by factor name, for example). Now comes the output. First off, the table structure is an outer table with one row and multiple columns. Each of the cells is an inner table with one column and as many rows as in your query listing unique factor values plus one (gots to have a header!). In your first column, loop over the list of unique factor values and output them. In each of the other columns, again loop over the unique factor values, but now you are looking within the real data query for the data you want. There are probably a bunch of ways to do this. (I'm sure whatever you come up with will be at least as good as my clumsy method.) In any event, the idea is that if you find a corresponding value, you put it in, and you otherwise leave 0 or - or whatever. HTH, Matthieu -Original Message- From: Snake [mailto:[EMAIL PROTECTED] Sent: Saturday, January 07, 2006 4:55 PM To: CF-Talk Subject: RE: FW: Outputiing dynamic columns Having had a quick read, pivot tables don't appear to exist in SQL Server 2000, which is what I am using. Russ -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: 07 January 2006 18:35 To: CF-Talk Subject: Re: FW: Outputiing dynamic columns Snake wrote: [http://www.satachi.com/russ/lists/yf.html] This is basically market research data that can be National, regional or local. If the locale is national, the data applies only to countries. If the locale is regional, the data applies to regions of countries. If the local is local, the data applies to a specific ity of a specific region of a specific country. Any factor may thus have any number of rows of data in the DB as it's data could be acros smany countries or regions, or just for a single city. There will be one row for each column of data in the output, which is made up of a country (required), region(optional) and city (optional). The output needs to be groupe dby the factorID. As you can see form my example, the factor called regional test has 4 columns as it has been recorded for multiple regions in the UK. The students factor only has data for 1 region, and thus will only have 1 column to output. In the same way, other factors could more or less columns. I this respect I think I probbaly cannot have a single heading for everything and will need to have new headings for each factor, otherwise they will not line up. You can have a single heading for all, but you run the risk you will have many localities in the header so your table gets very wide, and rows that only have data in one of them and are thus mainly empty. With the 4 UK regions in your example it is not that bad, with 50 US states where you have only one data point it is bad. That is a design issue you need to decide first. Another thing to consider is displaying the data hieragically. Instead of the example you show, you could use something like: United Kingdom | Wales | Kent | Yorkshire | East England | 2002 | 2| 2003 | 3| 2004 | 3|5 | 7 | 4 | 2005 | 4|6 | 5 | 6 | Anyhow, you need to read up on pivot tables. Google will lead you to some scripts that will help you a lot by doing the hard work in SQL. Jochem ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229522 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Preventing auto-fill
Cameron, I use the autocomplete=off approach with much success. I am curious though: is it true that you can override this setting from within the client? Matthieu -Original Message- From: Cameron Childress [mailto:[EMAIL PROTECTED] Sent: Monday, January 09, 2006 7:57 PM To: CF-Talk Subject: Re: Preventing auto-fill Rey, As has been suggested, you can dynamically name form fields, or try autocomplete=off, but after all is said and done, the client ultimately has control over caching that autocomplete data. Even if you change the form field name, the autocomplete data's being sotred on the client, it's just stored using a different form field name every time. Some might argue that this actually would create a BIGGER security risk for your users since you re essentially forcing them to store the credit card info over and over with different form fields each time. Either way, the browser makes the ultimate decision as to storing the form field data, how long to keep it, where to keep it, and how secure it is on the end user's computer. You can only do so much to protect your users from storing data insecurely on their own machines. You may serve your users better by just turning autocomplete=off and adding a quick link or hint informing (educating) the user that they should be not turn autocomplete on for data the deem secure or private. Of course that opens up a whole new ball of wax if you start trying to educate your users... -Cameron -- Cameron Childress Sumo Consulting Inc http://www.sumoc.com --- cell: 678.637.5072 aim: cameroncf email: [EMAIL PROTECTED] On 1/9/06, Rey Bango [EMAIL PROTECTED] wrote: Guys, Is there a way to prevent a browser's autocomplete/autofill feature from caching info on certain forms? For example, I don't want a credit card form field to be cached via autocomplete. The same with login prompts. Anyone tackled this before? Rey... ~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:229533 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: phone numbers in database
Brian, If you do text, you of course will want to do lots of validation on the way in to get rid of any parentheses, periods, spaces, dashes, etc. that the user puts in, so that you can then standardize it. Without advocating the original plan for number fields, I can at least tell you how to do what you wanted. If you have a table PHONENUMBERS: part1 part2 part3 4015551204 401555431 41555549 where the second and third rows should actually have a part 3 of 0431 and 0049, respectively, you can pull the appropriate value using this SQL: SELECT TO_CHAR(part3,'') FROM PHONENUMBERS or, for the full number (assuming that area codes and exchanges never start with 0) formatted as ###-###-: SELECT part1 || '-' || part2 || '-' || TO_CHAR(part3,'') AS PhoneNumber FROM PHONENUMBERS Of course, this just returns text anyway. But if you wanted to some reason to store them numerically but have queries hold properly formatted text, that's the trick. Also, I don't know if this works outside of Oracle. HTH, Matthieu -Original Message- From: Coleman, Brian [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 03, 2006 12:40 PM To: CF-Talk Subject: RE: phone numbers in database That is true, they are all US numbers and the same type of digits. I doubt they'd ever do any kind of searches on them. I think I'll switch it to be 1 field of text and slightly change the way it's entered. Thanks All -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 03, 2006 11:03 AM To: CF-Talk Subject: RE: phone numbers in database But then again, I guess he would have said there was a 4th field for a possible country code so you're probably right... It would sort fine either way. If they are all in fact 3, 3 and 4 digits you could still store them as numbers and format them accordingly with numberformat to put any leading 0's back in place Something like function phoneFormatter(e, p, n) { p = (#numberformat(e, '999')#) #numberformat(p, '999')#-#numberformat(n, '')#; return p; } (or you could probably format the numbers in your SQL) ..just another option. But, like DW said... if they are all the same number of digits... they will sort fine alphabetically and CF will have no problem seeing them as numbers if/when you need it to. :.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Bobby Hartsfield [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 03, 2006 11:41 AM To: CF-Talk Subject: RE: phone numbers in database If they are all US numbers that would most likely be true. .:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 03, 2006 11:29 AM To: CF-Talk Subject: RE: phone numbers in database The only issue with that would be sorting them numerically versus alphabetically 0 1 10 2 20 3 30 Would be what youd get with these numbers alphabetically instead of numerically... If they're phone numbers, I suspect they all have the same number of digits, so I don't see why that would be a problem. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228265 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: ColdFusion Cookbook
Ray, This does sound like a great idea. I can't claim to be expert enough to be writing any chef entries, but I am a PITA proofreader (folks never like me because I actually find all the errors--grin), and as a medium-level CFer, I know enough to be a sample user of the thing. So, I'd love to help out in that capacity if possible. I guess that means that I am volunteering to be a sous-chef, or maybe potwasher. As for specific ideas: 1) There are a lot of free resources out there that are fantastically useful on various other topics branching away from ColdFusion. For example, sites that give SQL tutorials, etc. When you get down to certain levels of detail in addressing topics, you could have links off to such sites, perhaps. 2) Examples examples examples! Well-written explanations are great, but the more novice you are, the more examples you need to have it make sense, I think. HTH, Matthieu -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED] Sent: Monday, January 02, 2006 10:27 PM To: CF-Talk Subject: ColdFusion Cookbook I'd like to announce the creation of a ColdFusion Cookbook. The site will be found at: www.coldfusioncookbook.com (not up yet) The idea is simple - provide a set of simple problems (how do I do X) and solutions, as well as alternative solutions. (Since we all know CF provides many ways to skin the cat...) While the site isn't quite ready yet, I'd love to get some feedback on what you would like to see on the site. I hope to have something up within a few days and will post again when the initial site is launched. -- === Raymond Camden, Director of Development for Mindseye, Inc (www.mindseye.com) Member of Team Macromedia (http://www.macromedia.com/go/teammacromedia) Email: [EMAIL PROTECTED] Blog : ray.camdenfamily.com Yahoo IM : cfjedimaster My ally is the Force, and a powerful ally it is. - Yoda ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228275 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: HTML In Application.cfm
Hi, all. I've been just an observer on this very interesting thread, with little to contribute in favor of either idea. However, in reading through the 73 (!) posts I had not yet seen when I came in today, something striking occurred to me. I saw the two camps as Keep display code separate from application code (i.e., no HTML in Application.cfm) and Mix as necessary. I understand very well the instinct of the latter camp in asking questions like, Yeah, okay, but *why not* mix them? because I have remnants of that instinct myself: from about six weeks ago before I took a Java programming course that was heavy on straight OOP theory as well as the Java specifics themselves. After realizing this, I saw that just about every e-mail I read came out like this: If is was from the mix as necessary camp, I felt my instincts from six weeks ago kick in. If it was from the keep display code separate from application code camp, I felt my new feelings kick in. Why do I bother writing this? Well, I think it is interesting to note that what really changed my mind on this was immersion in a fully OO environment. I would guess that those of us (myself very much included) who have treated ColdFusion as a purely procedural language are more likely to mix as necessary. But once you've tasted OO, doing such starts to turn the stomach. Because of some silly ups and downs, I may never directly use the Java training that I got, but even if I never do, I suspect that it will make me a much better ColdFusion developer. For those of you who--like me a few weeks ago--have not checked out OO, I strongly recommend you do some reading. There is a stunningly good (I say stunningly good because it is completely free) ground-up introduction to programming that uses Java as its language and focuses on OO available at: http://math.hws.edu/javanotes/ Just the ramblings of an observer. Matthieu ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228284 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Adding Multiple Objects
Well, I would say that you can add contact info without adding a user (multiple contacts, right?) but you can't add a user without adding contact info. So, it seems to me that you first instantiate the user and then instantiate the contact info entry, not the other way around (i.e., AddUser() first). Some reasons why: 1) What if you want to add a second contact later? Your class may not support this now, but if you want to add the ability to do it, you would have to rework things significantly if you called AddContactInfo() first. 2) If you call AddContactInfo() first and it calls AddUser() automatically, what if AddUser() throws an error? Then you are stuck with an orphaned contact entry. HTH, Matthieu -Original Message- From: Baz [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 03, 2006 3:37 PM To: CF-Talk Subject: Adding Multiple Objects Hi, If I had a USER cfc and a CONTACTINFO cfc and no user should exist without having contact info - whats a good way to add a user to the DB? Should I call AddUser() which in turn calls AddContactInfo()? OR, should I call AddContactInfo() first, then take the ContactID and pass it into AddUser()? Cheers, Baz ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:228300 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: A Contractor or Two
All, I don't have much more to add, except for some reinforcement of already stated ideas. My mother and step-father have been running very successful engineering consulting firms out of their house for years, and their advice to me has echoed what the folks on this list have said: 1) Never underbid. You devalue yourself in the eyes of the market. (To drive this home, a story about a family friend who owned a winery: he was having trouble with sales, despite consistently winning competitions. He raised his price about 35%, and sales went through the roof.) 2) Bill one hourly rate. Estimates of total job price should be based on the number of hours you anticipate. This way, if the client asks for extra, you simply estimate the extra number of hours, and they pay for that. If it's a total job quote that is not explicitly based (i.e., noted in the contract) on the number of hours, it makes it a lot harder to estimate add-ons. 3) Everything in writing up front, as detailed as possible. 4) Bill for the work you do. If you quote 35 hours, bill 22 if you work 22 and 39 if you work 39. It's usually a good idea to include something that says: will not go over unless client is first notified. See exception in number 6, below. 5) One sales technique is to provide the client with a menu. As you all know, getting the job done can mean a dozen different things for one set of specifications. For example, a simple web form might be made to work, but adding JavaScript utilities that make keyboard navigation easier might up the value of the tool. So, you say, x hours will get you the basic form, but x+4 hours will get you these other features. This can be tricky, though. 6) For those of you starting out: if you are worried that your rate sounds too high, or that your overall job price is too stiff, don't worry: you can lie! What do I mean? Let's say that you have decent skills, but you are on your first job out and feel nervous charging $1000 (20 hours at $50/hr) for a project because you aren't positive you can deliver the quality you want to deliver in the hours you've laid out. You can just work overtime for free, but tell them that you did it in the 20 hours. You take the hit in the short run, but as you gain experience and confidence, that goes away, and you don't have to deal with changing your rate over time. And if it takes you 60 hours (barring any truly giant problems that pop up), you will have learned better estimating skills! HTH, Matthieu ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227931 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Query String Dud - issue
Neal, How about this: CFIF Right(cgi.HTTP_REFERER,1) IS ? !--- URL ends with ? --- /CFIF If this is true, then the URL ends with a ?. I don't know whether having multiple ? in the URL will be necessary. If so, and if this will even work (I can't remember whether it causes browser error), then you should use this instead: CFIF Right(cgi.HTTP_REFERER,1) IS ? AND not Find(cgi.HTTP_REFERRER,?,Find(cgi.HTTP_REFERRER,?) + 1) !--- URL ends with ? that does not terminate valid query string --- /CFIF HTH, Matthieu -Original Message- From: Bailey, Neal [mailto:[EMAIL PROTECTED] Sent: Thursday, December 29, 2005 3:44 PM To: CF-Talk Subject: Query String Dud - issue Hey Guys... It's been a long time since I posted here... Well I have an issue and I just can't figure it out I think I have been staring at it too long now and my Braine is fried. Any help would be appreciated. Thanks. Ok the issue is... I have the Bit of Code that will strip out most keywords coming from a referring search engine and then store it in a database. My problem is when a site links to my site and has an ending ? and no query string I get an error. Stay with me, here is an example. http://www.26liter.us/news.html http://www.26liter.us/news.html ? If you visit that site and click on the link on the page that says Texas Motor Sport Ranch you will get an error on my site. The error is with this bit of Code. cfset referer_queryString = right(cgi.http_referer,len(cgi.HTTP_REFERER)-strStart) Here is the whole section of code that I am using: cfif len(cgi.HTTP_REFERER) cfif find(?, cgi.HTTP_REFERER) cfset paramList = q,p,terms,search,query,Keywords,keyword,Keyword,keywords,qkw,as_epq,sea rchf or,prev,qry,terms,term,k,s,ATC cfset strStart = find(?, cgi.HTTP_REFERER) cfset referer_queryString = right(cgi.http_referer,len(cgi.HTTP_REFERER)-strStart) cfset referer_url = left(cgi.HTTP_REFERER,(strStart-1)) cfloop list=#referer_queryString# delimiters= index=i cfif listfind(paramList,listfirst(i,=)) cfset variables.searchPhrase = listlast(i,=) cfset variables.searchPhrase = ReplaceList(listlast(i,=), +,%22,%2C,%20,%2B,%2F,%3A,%28,%29,%2E,%26, , , , , ,/,:,(,),.,) /cfif /cfloop /cfif /cfif Is there a way to clean an referring url if it does not have actually have a query string? I have trying a few things but I either fix it and break something else or just mess it up more. Any ideas? Thanks. Neal Bailey ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227942 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Query String Dud - issue
What I meant for you to do is to use that code to test whether the ? at the end of the URL was a bad query string example. So, where this might be valid: http://www.26liter.us/news.html?qVal1=34qVal2=apple this is not: http://www.26liter.us/news.html? The snippet I sent will test to see if the URL follows the bad format above. In that case, you do what you would do if the user loaded the page with no query string at all. The more complicated snippet I sent you lets a value like this pass through (presuming that ? within the query string are okay): http://www.26liter.us/news.html?qVal1=34qVal2=appleqVal3=Who? HTH, Matthieu -Original Message- From: Bailey, Neal [mailto:[EMAIL PROTECTED] Sent: Thursday, December 29, 2005 4:24 PM To: CF-Talk Subject: RE: Query String Dud - issue Hey Matthieu, Not sure I understand what to do with the code snippet you sent. It looks like its adding ? to the url when I want to remove it if there is not a query string available. Hope all this makes sense. I have been starring at it so long I'm not sure if I can explain it well enough. Neal Bailey -Original Message- From: Cornillon, Matthieu (Consultant) [mailto:[EMAIL PROTECTED] Sent: Thursday, December 29, 2005 2:51 PM To: CF-Talk Subject: RE: Query String Dud - issue Neal, How about this: CFIF Right(cgi.HTTP_REFERER,1) IS ? !--- URL ends with ? --- /CFIF If this is true, then the URL ends with a ?. I don't know whether having multiple ? in the URL will be necessary. If so, and if this will even work (I can't remember whether it causes browser error), then you should use this instead: CFIF Right(cgi.HTTP_REFERER,1) IS ? AND not Find(cgi.HTTP_REFERRER,?,Find(cgi.HTTP_REFERRER,?) + 1) !--- URL ends with ? that does not terminate valid query string --- /CFIF HTH, Matthieu ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227951 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Performance Problem - Client Variables
All, I am in the process of moving a CF site from one server to another. The new site is in CFMX7. I do not have access to the administrator settings, as I have to work through someone in another department on this. The problem is that I have ~8.5 seconds (+/- 0.2 seconds) delay on each page load. Not the slow load of dial-up, with pictures slowly appearing, but the delay and then a full instant load. This is true regardless of page content. I eventually ran a test where I took two identical pages, both blank HTML pages with no CF code and put them in an isolated directory where the Application.cfm had only the CFAPPLICATION tag. One page had the ..html extension, the other the .cfm extension. The former loaded instantly, the latter only after the delay. In another test, I tried setting clientmanagement to no, and the problem went away. So I am looking further there. Because I have no direct access to the Administrator page, I have to do my investigation remotely. I know that I am *supposed* to be storing the client variables in an Oracle datasource. This is how we currently do it, and it works fine. So, I am guessing that this is just a matter of a configuration problem there. While I am trying those things out, I am wondering whether any of you have any thoughts on the following questions: 1) In the CF Administrator, it seems that you set the client variable store for the *server* and not for the specific CF application. Is that correct? In other words, if I have two applications, named application_one and application_two in their Application.cfm CFAPPLICATION tags, but those applications sit on the same server, do all their client vars get put into the same datastore? If not, how (in the administrator module) does one set per-application settings? 2) Is there a way that I can programmatically display client variable settings for the application? In other words, is there some variable like Application.ClientStorage that I can read and display? (I ask because of the above-mentioned fact that I cannot access the administrative module directly.) 3) Does anyone have any experience with this sort of delay of constant length? Thanks a million, Matthieu ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227111 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Performance Problem - Client Variables
All, Thanks for your input on the client variable problem I mentioned. Turns out that the problem was that the client variable store table (in an ODBC datasource) was not indexed properly. Never would have tracked that down if you all hadn't given me the hints that you did. Major problem averted. Thanks once again for your help! Matthieu ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:227127 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Google search appliance and Cold Fusion
I, too, have had experience with this sort of thing. The approach I used has a bunch of dummy index pages that spill out db content in a way that will be interesting from a content perspective to people searching Google, but with nothing else on them. These index pages are then set with CFLOCATION tags that automatically redirect all visitors who don't match the IP address of the Google Search Appliance. The redirects go to the real page instead of the dummy index page. Doing it this way gives you very tight control over exactly what the GSA indexes and how it does it, and it's pretty easy to code, since it's just a bunch of simple pages that dump data. You're welcome to contact me off list if you would like. Hope this helps, Matthieu -Original Message- From: Robert Munn [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 29, 2005 11:36 AM To: CF-Talk Subject: Re: Google search appliance and Cold Fusion I have just started working at a place that has Google appliances being used to index and search a huge amount of content. We're closing in on the ceiling of our URL license and we're implementing a new version with double the licenses. Michael is right, the appliance indexes only URLs, so you need to build a bunch of crawler pages to dump any db content you want to index. I have done some work with it at this point and I'd be happy to share whatever meager lessons I have learned from it with you. Get me off-list at cfmunster at hotmail if you want more info. Does anyone have any experience/recomendations/lessons learned about integrating a Google search appliance into a Cold Fusion server environment serving dozens of sites and hundreds of thousands of pages? Thanks for any info, Jerry Johnson LawyersWeekly ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225585 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: HELP!! Query - Loop - List - Form Madness
Molly, Hi, there. I think that using a database alias will do the trick. If you use this syntax: CFQUERY name=getindiv datasource=sotl SELECT #i# AS ProposalName FROMgrades06 WHERE readerid = #session.readerid# /CFQUERY then you can refer to that column as getindiv.ProposalName. Also, I noticed along the way something I would clean up a bit. You can replace all of this code: cfset proposals = '' cfoutput query=getproposals cfset proposals = '#listappend(proposals,proposalid)#' /cfoutput with this: CFSET proposals=#ValueList(getproposals.proposalid)# Hope this helps, Matthieu ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225587 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Jump to an anchor link inside an iframe
Andy, Sorry. That's what I meant to say. The idea is that page 2 dynamically builds the URL with the named anchor using information passed it by page 1. So, for example, page 1 might link to: page2.cfm?pageToLoad=nameOfPageToLoadanchorToLoad=nameOfAnchorToLoad Then, page 2 loads #URL.pageToLoad#.cfm###URL.anchorToLoad# into the iframe. I think that's what you just said. Hopefully, you have it working by now and can ignore this babble. ;-) Matthieu -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 29, 2005 9:30 AM To: CF-Talk Subject: RE: Jump to an anchor link inside an iframe Matthieu... That's what I'm doing right now, but that *should* only work for the page containing the iframe. Because technically THAT'S the page I'm calling. I'm just passing some extra URL vars to allow me to load the iframe page correctly. A friend of mine suggested that instead of passing an anchor, to pass a URL var called anchor in the query string. Then in the iframe code, if that variable is present, I just created a named anchor and presto. I'm getting ready to test it out right now. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225588 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: SQL
CFSHEEPISHOops. Should have known better than to make suggestions on something I had never really done myself./CFSHEEPISH :) Now that I see it, Tanguy's suggestion is obviously the way to go. The temporary table thing that my friend here suggested was for something a little more complicated. Slowly retreating... Matthieu -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 29, 2005 4:43 AM To: CF-Talk Subject: RE: SQL There is no need to use a temporary table to copy rows from table to table!? ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225591 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: HELP!! Query - Loop - List - Form Madness
Ken, I ran this query on a table called USERS through Toad to an Oracle database: SELECT 404 FROM USERS and I got exactly what you described as a result: one column (named 404) with one row per row in USERS, each row equal to 404. I have contacted Molly off-list and am helping her with the db structure. It looks like she will be going with the restructuring/join approach advocated by the list. Matthieu -Original Message- From: Ken Ferguson [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 29, 2005 4:44 PM To: CF-Talk Subject: Re: HELP!! Query - Loop - List - Form Madness I'm interested to know what happens in SQL+ or Toad if you run: select 404 from proposals I mean, am I understanding you right that you have a column in a database named 404 (or some other number)??? I would expect, given 5 results from the above query, that you would get: | --| | | 1 | 404 | | 2 | 404 | | 3 | 404 | | 4 | 404 | | 5 | 404 | | --| | no matter what the values in that column actually ARE. --Ferg M wrote: All incredibly valid points! Unfortunately very short on time. . .they (faculty) need to start grading these things tomorrow evening. Starting closer to the beginning we currently have the following: 1) oracle database 2) one table containing the proposals -- proposalid, readinggroup, proposal details, status (saved - submitted) 3) one table containing reader info -- readerid, login, password, readinggroup What we need: 1)One table designed to hold all grades, for either group -- either together or separately 2) A form that can contain the correct information regarding the grades currently in the grades table for a given reader in a given reading group. Pathetic, isn't it? :-( I know its sad, but I want to learn how to fix this! THANK YOU! m On 11/29/05, Ken Ferguson [EMAIL PROTECTED] wrote: What database are you using? You need to name those columns differently. In MySQL, even if you do a straight select on a column named 404, it's going to return 404 for every row. However, if you name that column col_404, it'll return the values you're looking for. I think you've got a larger architectural problem here though. Why do you have these dynamic column names in the first place? This can all be represented much better in the database. You'd have a far easier time with your app and it'd work more efficiently if you reworked your db design to eliminate this nastiness. You're using a relational database for a reason -- so you can maintain the relationships between your data. You need to be taking advantage of that with joined tables rather than faking the funk with dynamically named columns in a table. --Ferg Molly Abraham wrote: It does and it doesn't. . .cannot figure out why. . . it seems to work. . but only returns the column name: cfquery name=getindiv datasource=sotl select #i# as grade from grades06 where readerid = #session.readerid# /cfquery tdcfoutput#getindiv.grade#/cfoutput (the column name -- ex: 404) is returned. . .not the value of '2' it contains. Debugging: getindiv (Datasource=sotl, Time=0ms, Records=1) in D:\Webpub\Wwwroot\ @ 12:18:47.047 select 404 as grade from grades06 where readerid = 2 Any more ideas?? Hugely grateful, but still apparently terminally slow. . . ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225634 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: SQL
Thanks for that, but is there a way to copy a whole row... This is a snippet of code that a friend here at work sent me for creating a whole new row from a whole old row all within SQL. It is Oracle-based, and I have never used it myself, but I am pretty sure that it does what you want. Say you have CUSTOMERS pkCUST CUST_FName CUST_LName CUST_ZIPCode and you want to copy the row with pkCUST=37 into a new row of the same table. Then just use this sequence of SQL statements: CREATE TEMPORARY TABLE t SELECT myNewID !---new primary key--- AS pkCUST, CUST_Fname AS CUST_Fname, CUST_LName AS CUST_LName, CUST_ZIPCode AS CUST_ZIPCode FROM CUSTOMERS WHERE pkCUST = 37; INSERT INTO CUSTOMERS SELECT * FROM t; DROP TABLE t; As I said, I have never used temporary tables, but I wish I had learned about them long ago. I think they are perfect for this sort of thing. I am not sure that in the first statement you need the ColName AS ColName statements; you might be able to just say * to get a copy of all existing rows, but you'd have to test it. Hope this helps, Matthieu ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225445 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Jump to an anchor link inside an iframe
This seems too easy an answer, so I probably missed something, but I'll give it a try anyway. You have page 1 currently sending variables to page 2, which dynamically loads page 3 in an interior iframe. Can you not send the name of a named anchor along with it and have page 2 load 'pageThree.cfm#anchorName' instead of 'pageThree.cfm'? HTH, Matthieu -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Monday, November 28, 2005 5:23 PM To: CF-Talk Subject: OT: Jump to an anchor link inside an iframe I have an app setup like so: page 1 (the calling page) page 2 (the called page) page 3 (loads in an iframe inside page 2) I have a link on page 1 which passes variables to the iframe (page 3) inside page 2. It's dynamic so when I load page 2, I simply tack on the variables to the iframe code and page 3 gets created correctly. Problem is now the boss wants the links on page 1 to jump you straight to the pertinent section of page 3 (inside page 2). So the question is: Does anyone have code (or ideas) which would let me jump from page 1 to the proper place on page 3 (inside page 2)? !//-- andy matthews web developer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:225467 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: listgetat problems....
I think that the delimiter attribute of ListGetAt looks at each character specified on its own. In other words, it's looking for three possible delimiters: %, 2, and 0. Maybe if you used the URLDecode function first, then used a space as delimiter? Otherwise, I'd replace %20 with some uncommon character and then specify that as delimiter. HTH, Matthieu -Original Message- session.keyword: #session.search_keywords# p keyword 1 : #listgetat(session.search_keywords, 1, %20)# br keyword 2 : #listgetat(session.search_keywords, 2, %20)# Any idea why the above code would output the following? Why isn't it breaking the list at the '%20' isn't that the way it's supposed to work? c%2B%2B%20developer ( which is url encoded 'c++ developer' ) session.keyword: c%2B%2B%20developer keyword 1 : c keyword 2 : B ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224357 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Can client.cfid and client.cftoken not exist?
Hi, everyone. Is it possible for Client.CFID and Client.CFTOKEN to not exist? With the exception of a read immediately following a StructClear or StructDelete statement, it seems to me that this gets set during the transfer of information between the server and the client before any ColdFusion processing happens. In other words, if I have a page whose very first two lines read: CFSET Variables.myIDVar = Client.CFID CFSET Variables.myTokenVar = Client.CFTOKEN will it fail if a brand new user visits that page on my site first? Thanks in advance, Matthieu ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224108 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Problem with relational tables
Mark, If I understand you correctly, all you need to do is a join in your query. Rather than having two queries, just have one: cfquery name=getInfo datasource=#request.dsn# SELECTdistrict_plan_documents.COLUMNNAME, district_plan_section_headings.DP_Heading FROM district_plan_section_headings INNER JOIN district_plan_documents ON district_plan_section_headings.DP_catID = district_plan_documents.DP_catID ORDER BY DP_catID, Line_Order /cfquery Then your output should look like this: cfoutput query=getDistrictPlanDocs group=DP_catID #getDistrictPlanHeadings.DP_Heading# ul cfoutput li style=padding-bottom: 10px a href=#httpdir##docpath#/#Document_name##Document_name#/a/li /cfoutput /ul /cfoutput I think that's right. Might be some syntax problems in there, but that gives you the idea. If this isn't what you meant, let me know. Hope this helps, Matthieu ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:224144 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
making a static snapshot of a site
Hello, all. I am preparing for some hypothetical scenarios. Under one, my web host stops supporting ColdFusion, and I have to keep hosting my site there. Obviously, there is no way around the fact that some of the functionality cannot be preserved without serious work. However, I am looking at a stop-gap measure that would provide a static snapshot of the site (where that made sense). Now, putting aside the fact that this is a terrible scenario, let's assume that this is something I want to and have to do: does anyone know of a tool that would do this? Specifically, let's say I have (1) an About Us section that is all HTML except for ColdFusion code that pulls the names and numbers of staff from a database and displays it on the phone list; (2) a Products section that includes a database-driven list of products and a details template that generates one a fully detailed page on one product as specified in by a URL variable; and (3) a form for running Verity searches on a directory full of Word documents. Obviously, I am up the creek on the search (number 3): you can't make that from static pages. But for numbers 1 and 2, the end-result--even under ColdFusion--is all HTML and JavaScript anyway. The tool I am imagining would browse the site, take HTML snapshots of the pages as they exist, and save them into the appropriate folder structure. Then I could drop this data onto my web server and have a working site. Certainly, I wouldn't be able to maintain it through database changes and all, but this is a last-ditch, stop-gap measure, so that luxury is unaffordable. Thanks in advance for any help, Matthieu ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223990 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: making a static snapshot of a site
Barney, Thanks! This looks perfect. Matthieu Barney Boisvert wrote: wget. Or any other web scraper/spider. We do exactly that for our sales guys when they're going somewhere and know they won't have an internet connection, so they can still have our website available. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223994 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
eKnowlogie: anyone know about this product?
Hi, everyone. I am looking at converting a ColdFusion site to Java J2EE (sniff, sniff). I have found a product called eKnowlogie. Their site (eknowlogie.com) claims to do it all and do it all nicely. I am still researching this, but I was wondering if anyone knew anything at all about this product. Thanks in advance, Matthieu ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223469 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Strange DB behaviour
Russ, I get somewhat similar behavior depending on how I add the data in question. I access the database in two ways: through ColdFusion code and through TOAD (a SQL client on my desktop). If I go through TOAD and I issue a regular INSERT statement and ask it to execute, I will immediately see the new row when I query it in ColdFusion. However, if I put the INSERT statement in as one of many and run it as a script, I will NOT see the new row in ColdFusion. I always forget about this, then remember that I have to issue an explicit commit command to the client in order for the row to show up in ColdFusion. Now, I hardly know what the commit command does. I admit to being a little database-stupid. But it seems clear that something of the nature of the database commands can be done in two different ways. In one way, it commits, and in the other, is does not. So, if the developers in question are adding this data through tools outside of ColdFusion (like TOAD, for example), maybe this is the issue? HTH, Matthieu -Original Message- From: Snake [mailto:[EMAIL PROTECTED] Sent: Friday, November 04, 2005 11:02 AM To: CF-Talk Subject: FW: Strange DB behaviour This is a weird problem we have once in a blue moon, I keep forgetting to ask if anyone else has had it. Sometimes a developer adds a new table or a new field to an exisitng data, or even a new row of data. But ColdFusion thinks it doesn't exist. We get an error saying no such table or column, and the resultset will not include the new row. And no the queries are not being cached (as least not in the code). I had experienced this on many different servers in different locations, and it appears to be random. I have had to reboot the server in most cases to get rid of the problem. -- Russ ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223262 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
OT: new next primary key value in Oracle
Hi, everyone. I have been doing something for years that works, but feels darned silly. I have a table called WIDGETS. I have a sequence set to increment by 1 up to some ridiculous number called WIDGETS_PKSEQ. When I add a new row to WIDGETS, I put WIDGETS_PKSEQ.NEXTVAL into WIDGETS.pkWIDG, the primary key for the table. Often, immediately after creating a new row in WIDGETS, I want to create a row in another table that references that new row in WIDGETS: for example, ORDERS.fkORD_pkWIDG refers to WIDGETS.pkWIDG. But to do that, I need to get that new WIDGETS.pkWIDG value, which has never actually appeared on the ColdFusion side of the transaction; it's all in Oracle. So, I do this ridiculous thing where I generate a random (and safely unique value), write it to some row in WIDGETS on the new row creation, look it up to get the new pk, then overwrite that row with the appropriate value it should have had in the first place, and then continue, now that ColdFusion has the new pk value known. There's got to be a better way! I know I am missing something easy. Any thoughts? Matthieu ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223055 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: SQL join a table to a set of values not in a table.
You could do a query of queries. You dynamically create a query result set that has your aDate values (cfloop over the range, and add a new row and value on each iteration). Run a query of your actual db table limited to the dates in question. Then run a query of queries where you do a join (I never remember my terms...left outer?) where it's all rows from the generated aDate query set and matching values from aTable. I can't remember if you can do outer joins in queries of queries, but I think this would work. HTH, Matthieu -Original Message- From: Ian Skinner [mailto:[EMAIL PROTECTED] Sent: Thursday, November 03, 2005 10:20 AM To: CF-Talk Subject: SQL join a table to a set of values not in a table. Say one has a table something like this (much simpler then the table I am working with, but should suffice for an example). aTABLE DATEcol VALUEcol --- 9/1/05 Red 9/3/05 Blue 9/5/05 Green I would like to create a result set that looks like this. aResult aDATE DATEcol VALUEcol -- --- 9/1/05 9/1/05 Red 9/2/05 NULLNULL 9/3/05 9/3/05 Blue 9/4/05 NULLNULL 9/5/05 9/5/05 Green I imagine that I would create some kind of inline select or from table, but I can't visulize how I would do this. Is it possible? The date range will be dynamic so I don't really want to create some table that has all possible dates for all of time, it would be a bit large I believe. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA C code. C code run. Run code run. Please! - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223056 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: new next primary key value in Oracle
DUAL?!?!!? That works, and is magic, but, again: ?!?!? I'll have to research this. I am sure there is a good reason for it being called DUAL. If not, and if this is truly arbitrary, then I am disappointed that the folks at Oracle didn't come up with some more colorful name, like SPAGHETTIFLASHLIGHT or ARNOLD. Thanks! This works wonderfully. Matthieu Ian Skinner wrote: When I have run into this, having to put a incremental key value into several tables, what I have done is select the WIDGETS_PKSEQ.NEXTVAL and then use that value in all my inserts. Somewhat like this off the top of my head example. cfquery name=nextKeyVal ... SELECT WIDGETS_PKSEQ.NEXTVAL AS KEY FROM dual /*I believe this is the proper 'table'*/ /cfquery Then I can refer to nextKeyVal.Key in all my inserts. I wrap this all up in a cftransaction block so that if a problem occurs I hopefully don't end up with 1/2 the data saved. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223059 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: new next primary key value in Oracle
Aaron, This is another good solution. Thanks, Matthieu -Original Message- From: Aaron Rouse [mailto:[EMAIL PROTECTED] Sent: Thursday, November 03, 2005 2:08 PM To: CF-Talk Subject: Re: new next primary key value in Oracle You could just run the insert on one table, then select out that new ID then use it for the other inserts. Something like: cftransaction ... cfquery ... INSERT INTO BLAH (COLA) VALUES ('YES')/cfquery cfquery SELECT MAX(ID) AS NEWID FROM BLAH /cfquery cfquery ... INSERT INTO BLAH2 (COLA, COLB) VALUES ('NO', #QueryName.NewID#) /cftransaction With that I assume a trigger is done to get the new value out of the sequence and it puts it into Blah.ID during the insert. On 11/3/05, Ian Skinner [EMAIL PROTECTED] wrote: Hi, everyone. I have been doing something for years that works, but feels darned silly. I have a table called WIDGETS. I have a sequence set to increment by 1 up to some ridiculous number called WIDGETS_PKSEQ. When I add a new row to WIDGETS, I put WIDGETS_PKSEQ.NEXTVAL into WIDGETS.pkWIDG, the primary key for the table. Often, immediately after creating a new row in WIDGETS, I want to create a row in another table that references that new row in WIDGETS: for example, ORDERS.fkORD_pkWIDG refers to WIDGETS.pkWIDG. But to do that, I need to get that new WIDGETS.pkWIDG value, which has never actually appeared on the ColdFusion side of the transaction; it's all in Oracle. So, I do this ridiculous thing where I generate a random (and safely unique value), write it to some row in WIDGETS on the new row creation, look it up to get the new pk, then overwrite that row with the appropriate value it should have had in the first place, and then continue, now that ColdFusion has the new pk value known. There's got to be a better way! I know I am missing something easy. Any thoughts? Matthieu When I have run into this, having to put a incremental key value into several tables, what I have done is select the WIDGETS_PKSEQ.NEXTVAL and then use that value in all my inserts. Somewhat like this off the top of my head example. cfquery name=nextKeyVal ... SELECT WIDGETS_PKSEQ.NEXTVAL AS KEY FROM dual /*I believe this is the proper 'table'*/ /cfquery Then I can refer to nextKeyVal.Key in all my inserts. I wrap this all up in a cftransaction block so that if a problem occurs I hopefully don't end up with 1/2 the data saved. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org http://www.BloodSource.org Sacramento, CA C code. C code run. Run code run. Please! - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223063 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: SQL join a table to a set of values not in a table.
Ian, Shouldn't the same technique work, where you do separate outer joins against each of those other tables? I only know Oracle SQL, so I never know how it would work in a query of queries (if outer joins are even an option), but I would do this in pseudocode: qTable1 SELECT Letters FROM Table1 WHERE KEY = Variables.MinValue AND KEY = Variables.MaxValue qTable2 SELECT Colors FROM Table2 WHERE KEY = Variables.MinValue AND KEY = Variables.MaxValue qTable3 SELECT Names FROM Table3 WHERE KEY = Variables.MinValue AND KEY = Variables.MaxValue qRange (This is the dynamically generated one that has qRange.KEY from Variables.MinValue to Variables.MaxValue) qJoin SELECT qRange.KEY, qTable1.Letters, qTable2.Colors, qTable3.Names FROM qRange, qTable1, qTable2, qTable3 WHERE qRange.KEY = qTable1.KEY (+) AND qRange.KEY = qTable2.KEY (+) AND qRange.KEY = qTable3.KEY (+) ORDER BY qRange.KEY You should get NULLs everywhere where there is no match, but the rest should work out. Again, though, I can't remember if this is allowed in Q of Qs. Matthieu That would probably work to solve the problem as I presented it. But the problem I was trying to solve is that I join several tables against the key value and I need them to show up whether the first value exists or not. Trouble is that I can not guarantee any table in the set will have a complete range of values to join against. A more complete example: Table1 Key Letters --- - 1 A 3 B 5 C Table2 Key Colors --- -- 1 Blue 2 Green 3 Red Table3 Key Names --- - 3 Joe 5 Sam The result set I'm looking for with a range between 1 and 5 should look something like this: Key Letters Colors Names --- --- -- - 1 A Blue NULL 2 NULLGreen NULL 3 B RedJoe 4 NULLNULL NULL 5 C NULL Sam ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223066 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: new next primary key value in Oracle
Yet another good answer. Thanks, gang, for sending these in. At least one will do the trick. Matthieu Matt Small wrote: One idea, if it's possible - pass all of this information at once into a stored procedure, which would know the newly created row id know what number to use. ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223067 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: new next primary key value in Oracle
I LOVE DUAL! Thanks! I'll be doing more research on this. Matthieu Deanna Schneider wrote: You're new to dual? Dual is just a wonderful little widget that acts like a one row table, but the column is arbitrary. You can do all sorts of stuff with it: select sysdate from dual; select 1 + 1 from dual; select 'I am not a crook' from dual; select ucase('malkjdflajldjflajdlfj') from dual; You get the idea. ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223074 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: SQL join a table to a set of values not in a table.
Ian Skinner wrote: We are also using Oracle here as well. Your idea would probably work, except Queries of Queries only supports inner joins. A limitation I have butted heads with on several occasions. Bummer. I can't think of a query-returning option, then. I would pull all the Oracle data into queries or maybe one query, then loop over my date range and check against the pulled query results as I went. Not neat, I'm afraid. Good luck. ~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:223087 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Caching, caching what is doing all this caching?!
Yesterday, my workstation started experiencing some maddening kind of intermittent caching. Ian, I had a similarly maddening experience just as I switched (simultaneously) from ColdFusion Server 5 to MX7 and from Dreamweaver Ultradev 4 to Dreamweaver 8. Don't know what caused it, but here is the ridiculous end I went to to get around the problem in the short term: I was playing with something where I needed to employ the poor old technique of trial-and-error. So, I posted the code and ran it. But it wouldn't reload, no matter what I did on the client side, unless there was a change in the size (I think) of the end file. Since I was making single character changes, it didn't reload. So, I added a 1 in the code for the body, pushed it, and it reloaded fine. After that test, I added a 2, so it now read 12, and repeated. Each time, I would add a new number (since simply changing the number would not work), until I was all done, then I deleted the whole string. Ugly, but it got me through what was indeed a maddening time. If anyone knows why this is happening, I would be curious... HTH, Matthieu ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222973 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: JavaScript in Mouseover
I get this JavaScript error on the mouseover below: Expected ')' tr onMouseover=HighLightTR('##f0f0e1'); ondblclick=self.location=('getinventory4.cfm?id=#id#lname=#lname#fnam e=#fname#serialnumber=#serialnumber#'); When I just use the ?id=#id# after getinventory4.cfm I do not get an error, but I need to pass the other parameters as well. Robert, Is the code above wrapped in CFOUTPUT tags? I ask because I just ran the following code on my site: self.location=('myPage.cfm?id=#id#lname=#lname#'); When I arrived at the page on my site, I saw this in the address bar: myPage.cfm?id=#idlname=lname So, it's stripping out those extra hash marks and the browser will treat everything to the right of id= as a page anchor address, and you'll have no query string vars passed. Are you sure that the error is being thrown by the mouseover code and not some JavaScript on the new target page? If you are sure, I'd have to see the HighlightTR function to go further. Hope this helps, Matthieu ~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222980 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
client variables and migration of site
The site that I maintain uses a client variable store that sits in Oracle. At some point in the near future, the entire site (web and database servers) is being migrated to new equipment. The people handling the migration will shut off all web connections to the old site, take a snapshot of all data, and move it over to the new site before restoring the connections. The database information will be part of this move. My question regards how to handle the client variable store: should I pull over the client variable data just like the other data in other tables, or should I start the new server with a fresh and empty table and let it re-populate? The latter option seems like it might be the way to go, as long as the client variable data's disappearance won't be a big problem. But I wanted to know if (a) anyone on the list had advice either way, or (b) whether anyone knew if trying to copy over client variable data would cause a system problem due to potential duplicate CFID/CFTOKEN pairs or something like that. Any thoughts? Thanks in advance, Matthieu ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222866 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
ColdFusion and WebLogic
Hi, everyone. A client of mine is telling me that their hardware providers may have force them to switch their site (written in ColdFusion) to WebLogic. To be honest, I hardly know what that means. I have seen that ColdFusion can be made to run in WebLogic, but the client may not have that option. Assuming that I have to recreate the code in WebLogic, I have a few questions: What language would that be? Java? If so... Someone told me that because MX runs with Java underneath, there is a way to unwrap ColdFusion code to get at the Java underneath, thereby allowing me to switch over without rewriting the code from scratch. Is this true? Easy? Impossible? Thanks in advance, Matthieu ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:222867 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: How do I rewrite this as a join query?
I'm using MySQL (4.0) version, which doesn't support subqueries, so I need to rewrite this as a join query...how would I do that? Well, here's a clumsy idea that gets the job done. Do an outer join (don't know the exact syntax for MySQL) that gets you two columns in each row: email address from classroom_access_list and email address from classroom_access_list. In your output, you just say if column 1 is blank, use column 2, otherwise, use column 1. The values will be deduped by virtue of the fact that equal values will collapse into a single row. HTH, Matthieu ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184592 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Oracle CFQUERYPARAM error
All, Hi, there. Have a bit of a tricky one. Before starting, let me say that I know the real solution is to use CLOBs, but I need to make this work in the meantime. I have to put huge amounts of text into tables whose columns are already defined and whose setup may not be changed. Luckily, I have a bunch of VARCHAR2(4000) columns free. My thought was, cut the text into 4000-character chunks, then put 4000 into each field until you've added all the text. When I tried it, I got this error: [Oracle][ODBC][Ora]ORA-01461: can bind a LONG value only for insert into a LONG Column. Now, in the past, I have had trouble with the fact that CFQUERYPARAM seems only to want to bind 2000-character-or-less strings to CF_SQL_VARCHAR, and anything over that up to 4000 characters has to be CF_SQL_LONGVARCHAR. I have code in place to handle that. And I have verified many times that the text I am entering is in fact cut into 4000-character chunks. Still, though, I get the above error. If I enter it straight into the same table using a SQL command client, it fits just fine. I have even cut the chunks down to 2000-characters and switched to only CF_SQL_VARCHAR entry. Still no dice. Any thoughts on handling this? Thanks, Matthieu ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184411 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
strange behavior: session vars, cfid, cftoken, cookies
Hi. I have a really weird problem here that is hard to summarize, so I am just going to ask anyone if they've had anything even vaguely like this, since that might help me know where to look. I have a sign-in and registration system on my intranet site. Here is the system: a user registers, creating an Oracle user record. They sign-in, and a cookie is dropped on their machine with their a unique ID for accessing the Oracle record. The Application.cfm file checks the cookie, runs it against the database, tests a bunch of things, and sets some session variables that say who is used in, their unique ID, their name, and some other stuff. From then until the session variables expire, all pages check session variables first to determine user state. This allows me quick access to all the data in the session variables without having to store it in the limited space of cookies and without having to re-run all of the testing that is run when the session variables are not yet set. Here is where things get weird. This thing had been running fine for a year or so with over 10,000 active users, when suddenly I started getting reports of what I now call the username switch problem. John Smith would be logged in, come to a page on the site and see the name Amanda Jones in the username display on the sidebar of the site. Sometimes, it seems (although this was very hard to track), Amanda Jones would at the same time see her name changed to John Smith. I think that there may have been three-way switches, where three users essentially rotated names. I have patched this by setting logic that checks the current user ID against the cookie user ID. If it finds a mismatch, it re-runs the initial checking and resets all the session variables. I have, since creating that patch, gone about a year without any more reports of problems. Yes, I know, I should have fixed the problem, but as things are always a rush, it always got pushed to the back burner. Now it has reared its ugly head again. I have no idea why this is happening. Bottom line: the session variables for one user are suddenly getting swapped for the session variables of another user, all in mid-session. I believe that all of the session variable reads/writes are properly locked, and--in any case--it strikes me as odd that the errors would so cleanly swap several session variables rather than swapping just some of it and causing errors. If I had to guess, I would say that it seems like the CFID and CFTOKEN of two users get swapped, so that the server simply recognizes each as the other, but that's a wild guess that I can't prove. Does anyone recognize this kind of behavior at all? Any ideas where I might look for a solution? Thanks, Matthieu ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=38 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182625 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: strange behavior: session vars, cfid, cftoken, cookies
From Michael: What version of CF are you running. I am running CF5.0. From Bryan: If you're running clustered servers, there could be some session confusion between servers. Assuming this is the case, is there anything I can do about it? Thanks! Matthieu ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=37 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182629 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: strange behavior: session vars, cfid, cftoken, cookies
Bryan, Thanks for this information. I have more or less stopped using session variables in general (can't stand all that pesky locking business), but that has only happened since I released the sign-in/registration system. I agree about the security hole inherent in the cookie system. I am re-designing the system soon anyway, so I guess that I will just have to deal with these problems until I get there. Your advice is very helpful, though, as guidance in that re-design. Thanks again, Matthieu ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=36 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:182652 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Field Naming
My two cents: I (sinfully) use the plurals in the table names. Can be confusing, yes, but if you are consistent one way or the other, you should be able to remember what you are doing. My rules: 1) Each table name has a related table abbreviation (e.g., CLIENTS has CLI, PHONENUMBERS has PHONE). 2) Each column in a table contains the table abbreviation (e.g., CLI_Fname, CLI_Lname, CLI_HatSize). 3) The primary key of a table consists of pk followed by the table abbreviation (e.g., pkCLI, pkPHONE). 4) Foreign keys in a table consist of fk followed by the local table abbreviation followed by an underscore followed by pk followed by the foreign table abbreviation (e.g., fkCLI_pkPHONE is the foreign key referencing the primary key of the PHONE table). Note: there are two circumstances under which this wouldn't hold: (1) if your foreign key references something other than the primary key of the foreign table; and (2) if two foreign keys in your table reference the same primary key in another table (e.g., a table marked CALLS twice refers to pkUSR, once for the person who called and once for the person who answered: the notation can't be fkCALL_pkUSR for both, but is instead fkCALL_pkUSRFrom and fkCALL_pkUSRTo). 5) Junction tables use the two table names/abbreviations separated by an x (e.g., CLIENTSxLOCATIONS is the junction table between the CLIENTS and LOCATIONS tables, with a primary key of pkCLIxLOC, and--the longest and messiest within my system--foreign keys referring to CLIENTS and LOCATIONS: fkCLIxLOC_pkCLI and fkCLIxLOC_pkLOC). 6) If you have a table which lists the types of things in another table, follow it's name and abbreviation with the letters ty. For example, in this example, the table listing the types of clients would be CLIENTSty, with an abbreviation of CLIty. CLIENTS then would likely have a column called fkCLI_pkCLIty that tells what kind of client it is. 7) When I am writing SQL, I strictly adhere to the cases as I have them written above. This makes a HUGE difference in readability. Indeed, much of my system is predicated on the fact that changing case can really stand out. fkCLIxLOC_pkCLI is extremely clear in meaning to me in large part because of this. FKCLIXLOC_PKCLI is not so clear. This may sound a bit complicated, but I find that the code is very easy to read. When I come back to a project I have not worked on in a long time, I can read the SQL without any trouble. HTH, Matthieu -Original Message- From: Andrew Dixon [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 19, 2004 7:30 AM To: CF-Talk Subject: OT: Field Naming Hi Everyone. I'm just starting a major project for a government client and the first job is to design the database. Is there any recongnised convention on the naming of database fields. In the past I have always named them [table_name_field_name] for example: projects_id where the table is called 'projects' and the field is called 'id'. Thanks in advanced. Best Regards Andrew. ~| Sams Teach Yourself Regular Expressions in 10 Minutes by Ben Forta http://www.houseoffusion.com/banners/view.cfm?bannerid=40 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:181936 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Field Naming
The are so many options on which styles to follow, the approach I recommend is to pick a something, document it and follow your document. This is indeed the most important thing. The system I just laid out (that I use) in another e-mail is only useful to me insofar as I am consistent in sticking to it. Some other things to consider in being consistent, outside of the naming system itself: 1) Layout of your SQL statements in terms of indenting. 2) Capitalization of SQL command terms. 3) Full qualification of columns (e.g., CLIENTS.CLI_Fname instead of CLI_Fname). HTH, Matthieu ~| Purchase from House of Fusion, a Macromedia Authorized Affiliate and support the CF community. http://www.houseoffusion.com/banners/view.cfm?bannerid=35 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:181937 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: page creation times
Anders, DISCLAIMER: All of the rambling you are about to read is based on my own experience designing user interfaces, and none of it is based on industry standards.In other words, get your grains of salt ready. I think that it depends what page is loading, and how it all fits into the user experience.Generally, I do everything I can to trim page times down, and I get really anxious when processing approaches one second.That said, some pages take longer.That's when the context of user experience becomes important, in my eyes. Some examples within my personal experience: 1) I am browsing around a site to try to find something.I don't know where it is, exactly, so I have to try a bunch of different options.If all of the options along the way are a bit slow (let's say 2-5 seconds each), my brain starts to smoke and I go elsewhere if possible. 2) I browse around a site with quick loading pages, and then get to the tool that is clearly what I want.Let's say it searches some database for hat sizes of celebrities.Perfect!I want to know what size hat to buy John Cleese for his birthday.I enter John in the first name field, Cleese in the last name field, and wait 43 seconds for the query to load.My brain does not start to smoke. This is an expansion on what I feel to be the hole in the old three-clicks-maximum rule.If I have a certain sense that I am going toward what I want, I don't care how many clicks it takes; if, on the other hand, I have to wander around a lot and pick with only partial certainty from the links at any given level...brain smoke.It's the same with time, in my eyes. The other issue, I think, is frequency of page use.I don't care that running an advanced find of every message in my Outlook mailbox takes a long time: it gets the job done in the infrequent cases where I need to run such a search.But when the Exchange server bogs down and opening new e-mails gets slow (even by a half a second)...brain smoke. HTH, Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: page creation times
The theory in that is a very very good answer... finally a pretty balanced point... altho you may want to cache that 43 second query somehow so that it isn't that long the next time round :) Indeed.I was mainly using such a big number for contrast.In general, a 43-second process had darn well better return me a golden egg. :) Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: SQL Question...
Can anybody lend a hand and help me out on this one?All it does is return 1 row no matter how many rows are in the sizeLine table.. Blaine, I'm not exactly sure why this is happening, but here are some ideas of what to check: 1) Forgive me for suggesting the obvious, but since it's not specified in your post, I want to be sure I'm not missing something: how do you know it is returning only one row?Could it be an error in your output routine?If you put this code: record count = CFOUTPUT#sizeList.RecordCount#/CFOUTPUTCFABORT ...immediately after the query and run the page, do you get a value of 1? If not, your problem is likely in the output routine somewhere.If that is what you find, check to make sure that you are properly looping over the rows to show all values. 2) I use Oracle and am not completely familiar with the SQL notation you used, but I think that the joins force there to be one matching row on both sides.If SizeID only has one row, the most you can possibly get out of the query is one row.If you are testing and don't have real data in there, something like this could be responsible. If none of that works, could you post a little more information about your output routines and some sample data? HTH, Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: SQL Query Help Please.
2.) Can someone please suggest a good book on SQL syntax that will clear thing up for me. Other beginner resources: 1) http://www.sqlcourse.com/ http://www.sqlcourse.com/ 2) http://sqlcourse2.com/ http://sqlcourse2.com/ 3) http://www.freeprogrammingresources.com/sql.html http://www.freeprogrammingresources.com/sql.html(links to many others) [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: SQL Question...
Wow, do I ever feel stupid.It was the output stage that I had my problem with.It's fixed, that join query runs fine. I'm glad it worked out.No need to feel stupid: getting a second (third, fourth,...,nth) pair of eyes to look at the issue freshly is one of the great things about this list. Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: grouping by...
If you want to do this in SQL, you can use the DECODE function.Let's say you have a table called TASKS, and you want to prioritize TASK_Name by TASK_Priority, High to Low: SELECT TASK_Name, DECODE(TASK_Priority,'High',1,'Normal',2,'Low',3) AS PriorityOrder FROM TASKS ORDER BY PriorityOrder If you can't use DECODE because of your platform, you could also try the tricky trick of using the third character in the TASK_Priority value, since that works out the way you want it (g-r-w): SELECT TASK_Name, SUBSTR(TASK_Priority,3,1) AS PriorityOrder FROM TASKS ORDER BY PriorityOrder Finally, if you don't have SUBSTR either, you could do this clumsy bit: SELECT TASK_Name, '1' AS PriorityOrder FROM TASKS WHERE TASK_Priority = 'High' UNION SELECT TASK_Name, '2' AS PriorityOrder FROM TASKS WHERE TASK_Priority = 'Normal' UNION SELECT TASK_Name, '3' AS PriorityOrder FROM TASKS WHERE TASK_Priority = 'Low' ORDER BY PriorityOrder HTH, Matthieu -Original Message- From: Phillip Perry [mailto:[EMAIL PROTECTED] Sent: Monday, October 11, 2004 12:31 PM To: CF-Talk Subject: grouping by... Hi, I want to arrange my data that is being displayed by the database field importance. I want High to be shown first, then Normal, then Low (which are the 3 choices in the importance table). How can i get Normal items to show up before Low items? _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: currentrow is undefined?
Phillip, In the CFQUERY tag, you define the name of the query as display.So the later CFIF statement should read CFIF Display.CurrentRow... instead.When you took out the error_table part, CF looked through the available variable scopes and found the data somewhere, but it may have been looking in another query.Changing it to explicitly refer to Display.CurrentRow should fix the problem. HTH, Matthieu -Original Message- From: Phillip Perry [mailto:[EMAIL PROTECTED] Sent: Monday, October 11, 2004 1:24 PM To: CF-Talk Subject: currentrow is undefined? Thanks for the info from my last question. Now here is my next issue. I am calling for information from 2 tables. I want to find out which row is even and which is odd from one of them. I'm using. cfif error_table.CurrentRow MOD 2 IS 1but this throws an error saying that currentrow is undefined. Yet if I take out the error_table. part it works, without ever finding the odd and even rows. I'm trying to use this to format the bgcolor and txtcolor of a tr td. The code is below. How do I fix this error. cfquery datasource=#mydbname# name=display SELECT * FROM error_table, importance /cfquery cfoutput query=display cfif error_table.CurrentRow MOD 2 IS 1 cfset bgcolor=white cfset txtcolor=black cfelse cfset bgcolor=black cfset txtcolor=white /cfif tr bgcolor=#bgcolor# style=text-color:#txtcolor#; Thanks for the help Phil _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: looping query
Adam, I think that it is just bad coding.I have seen a fair amount of confusion on the point of getting values out of a query (e.g., people often seem refer to MyQuery.ColName without looping, unintentionally getting nothing but the first value).Also, I think people often don't know array notation for queries.I myself coded for some time before finding out about it.If someone were faced with the task of getting the last value from a query, I can imagine this is how they would do it. I'm sure you know all this, but I thought I'd add another voice saying, I think it's poor coding. HTH, Matthieu -Original Message- From: Adam Haskell [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 05, 2004 8:42 AM To: CF-Talk Subject: looping query Ok so I inherited an application to update and I am trying to clean it up a little bit,or maybe a lot, but I keep running into this: cfloop query=MyQuery cfset revBy=MyQuery.rev_by cfset revDt=MyQuery.rev_dt /cfloop why oh why would some one do this? Is there a good explanation? Since the code is not commented I have no idea who the original author is so I can't ask him/her. At the very least wouldn't cfset revBy = MyQuery.rev_by[myquery.recordcount] cfset rev_dt = MyQuery.rev_dt[myquery.recordcount] Get you to the sane place faster? Most of these queries I think are only supposed to return one row but still I would think, especially on CF 5 which is what this app is running on, the looping would be a waste of time. Anyone's thoughts? _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Headache with # in table colors
Is there an easy way to go about handling table rows/columns colors as I am doing my page design/layout? Donna, I'm not sure if this is what you're going for, but here's a stab: between CFOUTPUT tags, use ## instead of #. HTH, Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
form variables without forms?
Hello, all. I have to submit some values to a form action page.I have no choice on the far end: it is expecting POSTed form variables.On my end, though, this is kind of a pain, because I need to do an intermediate, non-user step before the submission.So my situation is: UserForm - page on which user enters data. ServerActionPage - page on which server does some stuff. FormActionPage - page on far end that expects POSTed form variables. I could set ServerActionPage to do its business in ColdFusion and put the variables into hidden form fields, then have _javascript_ that on the client side automatically submits the form.This puts one extra page in the middle of the process for the user.Yes, I know, the user won't really see it, but I always try to avoid that pesky can't hit my back button problem. My question is this: is there some way to pass form variables that doesn't require a client-side action?I have successfully experimented with adding them to the query string, but I don't know whether this is something I can rely on.In other words, I have turned: FORM name=myForm action=""> method=POST INPUT name=field1 value=A type=hidden INPUT name=field2 value=B type=hidden INPUT name=field3 value=C type=hidden /FORM ...into: http://www.myserver.com/myFormAction.html?field1=Afield2=Bfield3=C Is this a bad practice?Will it work reliably? Thanks in advance, Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: form variables without forms?
have you tried cfhttp? Lawrence, I have never used CFHTTP before, but I don't think it will do it.I have just tried setting it up, and it doesn't go anywhere.In other words, it seems that the data is posting to the other server, but the client never goes there.I want this to be exactly the same as if the user has clicked submit, but without the user having to click submit. Am I missing something? Thanks, Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: form variables without forms?
Chris, Thanks for this message.Unfortunately, I am getting a connection error.I am guessing that something about the set-up I am using doesn't allow this approach?I am going from one company to another, across at least one firewall.I probably have another solution, but in the interest of understanding CFHTTP a little bit better, is it likely that the connection error comes from going through these firewalls or some similar network issue? Thanks, Matthieu You would want to do something similar to this: !--- Send form fields --- cfhttp url="" method=post cfhttpparam type=formfield name=variableName value=#variableValue# cfhttpparam type=formfield name=variable2Name value=#variable2Value# /cfhttp !--- Output action page --- cfoutput#cfhttp.FileContent#/cfoutput [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: form variables without forms?
is your network behind a firewall? do u find it takes forever for it to process? you may need to add your proxy's address, port, username and password... may not be allowing you to post. Yes, it is.I have been playing with this with no luck.This should be my proxy address, port, username, and password, right?Interestingly, entering any of this information gives me the error a lot faster; if I leave it out, the thing takes a while to come back and tell me that it has failed. As for the error message I am getting: when the page loads, the output of CFHTTP.FileContent yields Connection Failure.That's all there is. As for the question about being able to hit the URL from the server, I am able to CFLOCATION to the URL.If I run a client (IE) on the server, I can get to the URL.Does that answer the question? And wouldn't you know it, the other solution fell through, so I now need something along these lines after all. Thanks, Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Order in multi-column select box
This is a long shot, but if you are pulling your from Oracle or another DB that allows the LPAD/RPAD functions, you could pad it on the query instead of having to loop through it.In fact, I often, when putting values like this together in select statements, do all of the concatenation in the query.Is this faster/slower?I don't know.It just turns out nicer, easier-to-handle values. If your columns are part number, dimensions, and cost, your query might look like this: SELECT LPAD(INV_PartNo,5), LPAD(INV_Height,4), LPAD(INV_Width,4), LPAD(INV_Depth,4), LPAD(INV_Cost,7) FROM INVENTORY RPAD just pads on the right instead.If you want to pad with something other than spaces, add it as a single-quote delimited third parameter to the function.For example: LPAD('dog',7,'R') returns dog. HTH, Matthieu -Original Message- From: Rick Mason [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 29, 2004 11:06 AM To: CF-Talk Subject: OT: Order in multi-column select box I've had to build a select box with five columns for a current project.How can I keep the columns in straight lines and not displayed every which way? I looked at some past code and I don't think I have ever done a select with more than two columns displayed.It cries out for a table but I can't do a table inside a select statement. Short of looping through each column and adding enough spaces to make them all equal to the largest record in the column I can't think of a better way.Is there an easier method that I am missing? Rick Mason _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: type ahead select lists
Anybody know of a script that replicates type-ahead select lists (like in Gmail or offline VB applications)? George, I built this using _javascript_.It's not too pretty, but it works just fine. The idea is that a global variable is the buffer in the list, to which keystrokes are added.The script is set to work on my page, but I am sure you can figure out how to adapt it. HTH, Matthieu * NOTES * 1) pkTAX is the primary key in the table listing the options for the drop-down. 2) TAX_Term is the text of that option. ** SELECT TAG LOOKS LIKE THIS ** SELECT name=pkTAX > > OPTION value=-1 selectedSelect a taxonomy term to add.../OPTION CFLOOP query=qTerms OPTION value=#qTerms.pkTAX##qTerms.TAX_Term#/OPTION /CFLOOP /SELECT *** THESE GO IN THE HEAD SECTION. *** // Declare global variables used for typeahead feature. var ta_pkTAX = ; var sn_pkTAX = ; // Handle keystrokes. function typeAhead() { // Check whether user has hit enter, requesting that the form be submitted. if (event.keyCode == 13) { // CASE: user wants to submit form. runSubmitFunction(); } else { // Set basic variables. var keyPressed = String.fromCharCode(event.keyCode).toUpperCase(); var currentlySelected = document.frmDummy.pkTAX.options.selectedIndex; var selectNew = document.frmDummy.pkTAX.options.length; var i = 1; // Add latest key pressed to global storage for this control. ta_pkTAX = ta_pkTAX + keyPressed; // alert(ta_pkTAX); // alert(sn_pkTAX); // Find closest match in list. while (i document.frmDummy.pkTAX.options.length) { selectNew = i; // Is the current entry the closest match? if (document.frmDummy.pkTAX.options[i].text.substr(0,ta_pkTAX.length) = ta_pkTAX) { // CASE: yes - end loop in place. i = document.frmDummy.pkTAX.options.length; } else { // CASE: no - increment to next value i++; } } // Set value of select box. document.frmDummy.pkTAX.options.selectedIndex = selectNew; // Set stored typeahead value for select box. sn_pkTAX = selectNew; } if (event.keyCode == 27) { //handle escape key event } } function adjustForTypeAhead() { // Is there a stored typeahead selection value for the select box? if (sn_pkTAX != ) { // CASE: yes - set select box to that value document.frmDummy.pkTAX.options.selectedIndex = sn_pkTAX; sn_pkTAX = ; } else { // CASE: no - reset typeahead storage variable. ta_pkTAX = ; } } [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Select Box / LIKE operator
If the end user just enters e in the search box, I am not so sure that I want every name that contains an 'e' to be returned Or do I??? What is the consensus on how to make something like this work best? I personally like the anywhere in the string approach, but I have found that most people expect it to be at the start of the string, as Steve mentioned.People get confused when a search for DER returns ANDERSON at the top of the list, when they were in fact looking for DEREK. HTH, Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: ;amp in my URL's?
Im trapping a few errors per day which means probably 1-1000 users (or more) is experiencing this problem, and not sure what could be causing it. AAARGH!That foul beast dares rear its head again!?!!(read with pirate voice and one eye squinted shut) I had/have this exact same problem.The site I work on has two sides: one that I manage, using CF, and the other that someone else manages, using any number of technologies, including Lotus Notes.The sign-in/registration system that I designed runs over the entire site, so the two sides have to play nice together.Because the other side doesn't use CF, I had to do some trickery.This trickery involves (among other things) _javascript_ code that sits on that other side, and which bounces users who aren't signed in over to my side.Of course, in doing this, I want to be sure that I can route users to their desired location after the sign-in.To do this, I place their desired URL into a URL variable.Here's where things fall apart.I can't remember exactly which part causes the error, but the idea is that some bit of it all (the browser, the _javascript_ code, something) converts those nice characters to their HTML equivalents (amp;) and all hell breaks loose.As I remember it, the problem was even more complicated in that even if I got it through the first step, it might get fouled up at the second step (when I send the user back). Bottom line (ugly bottom line): my solution was to stop trusting the various bits that were converting the ampersand character into its equivalent and back.At the very start of the process, I replace all ampersands with the lovely string QQQampQQQ.At the very end of the process, I reverse the process, replacing QQQampQQQ with ampersands, and redirect to that address. I readily admit that there must be a better way.That said, I caution you against spending too much time finding it.As I remember it, the reason I went this way was that--while I could get it to work in one scenario--the various possible cases got rapidly complicated, and it was much easier to convert the string immediately into something that would be preserved regardless of which automatic conversion it was going through. All that said, can I help you at all?I would make sure I know the process from end to end: where does the URL begin its life as a variable, and where does it end that life.If you can't figure out an easy way to fix it, do the ugly trick above. HTH, Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: OT:Javascript Problem
Vishnu, I think that having the field names all the same will be a mistake, as it will complicate the issue on your form page, if not outright causing errors. In any case, you do not need to have the field names be exactly the same as your database field names.I have done this sort of form many times.It always is a bit complicated, but the basic idea is that I loop over the form fields when I get to the action page.On each loop, if I find a valid entry, I run a CFQUERY tag with an INSERT statement. HTH, Matthieu -Original Message- From: vishnu prasad [mailto:[EMAIL PROTECTED] Sent: Monday, September 20, 2004 4:00 AM To: CF-Talk Subject: Re: OT:_javascript_ Problem Thks for the Code but i need to have all the contorl name as same ? so that it will be easy for me to inster the values in the database if not will u tell me howto slove this problem in the action page i have to insert the rows enter in the previos page into DB _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Using a value from one insert for another insert
I don't know the proper way to do this, but I can tell you the hideously unattractive and effective three-query way that I do it.I use various items to create something that I know will be unique.For example, I concatenate user ID and current time.I put that in a local variable.I run the insert query, putting this unique value into some field that really is for something else, say product_description.I run a select query pulling the primary key for the row that has that unique value in product_description.I then run an update query, putting the proper product description in the row at the primary key found. As I said, ugly, but effective. Good luck, Matthieu -Original Message- From: daniel kessler [mailto:[EMAIL PROTECTED] Sent: Thursday, September 16, 2004 10:54 AM To: CF-Talk Subject: Re: Using a value from one insert for another insert I'm now receiving an invalid character error.I can do each of the inserts independently, but when I put them together with the RETURNING line, I get the error. INSERT INTO fsnep_polls ( p_id,p_date_added,p_question, p_status,p_date_last_used ) VALUES ( unique_poll_Num_s.NEXTVAL,#Now()#,'#Form.p_question#', #Form.p_status#,#p_date_last_used# ) RETURNING p_id INTO new_p_id; INSERT INTO fsnep_pollAnswers ( pA_ID,pA_answer ) VALUES ( unique_pollAnswers_Num_s.NEXTVAL, '#Form.p_answer1#' ) Well you should put it in a procedure rather than inline. Then you could do something like: INSERT INTO fsnep_polls ( p_id,p_date_added,p_question, p_status,p_date_last_used ) VALUES ( unique_poll_Num_s.NEXTVAL,#Now()#,'#Form.p_question#', #Form.p_status#,#p_date_last_used# ) RETURNING p_id INTO newly_created_id (note the RETURNING syntax used in PL/SQL) Outside of that, if you must stay inline, you could use unique_poll_Num_s.CURRVAL. That should return the current value of the new primary key. Although this is dangerous, make sure to keep your transactions tight. -Adam - Original Message - From: Daniel Kessler [EMAIL PROTECTED] Date: Thu, 16 Sep 2004 09:56:46 -0400 Subject: Using a value from one insert for another insert To: CF-Talk [EMAIL PROTECTED] I'm in Oracle.I do an insert for a poll question, then I need to get the ID of that question and insert it into each one of the answers that I write to a different table (see code below).Without a separate query, is there any way to get the ID inside the same query to use again for the answers?Also, would doing a seperate query be a bad idea? thanks. CFQUERY NAME=addItem DATASOURCE=eatsmart INSERT INTO fsnep_polls ( p_id,p_date_added,p_question, p_status,p_date_last_used ) VALUES ( unique_poll_Num_s.NEXTVAL,#Now()#,'#Form.p_question#', #Form.p_status#,#p_date_last_used# ) cfloop index=ii from=1 to=5 cfif Form.p_answer1 NEQ INSERT INTO fsnep_pollAnswers ( pA_ID,pA_pollID,pA_answer ) VALUES ( unique_pollAnswers_Num_s.NEXTVAL,#Form.p_id#, '#Form.p_answer1#' ) /cfif break; /cfloop /CFQUERY -- Daniel Kessler Department of Public and Community Health University of Maryland Suite 2387 Valley Drive College Park, MD20742-2611 301-405-2545 Phone www.phi.umd.edu _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: SQL, count
What i basically need to do is get a list of ID2 and a count of the people ID1 invited. Andy, How about a self join?(The following assumes that the name of your table is NAMES). query=qNames SELECT INVITERS.ID2 AS InviterID, INVITERS.NAME AS InviterName, INVITEES.ID2 AS InviteeID, INVITEES.NAME AS InviteeName FROM NAMES INVITERS, NAMES INVITEES WHERE INVITEES.ID1 = INVITERS.ID2 ORDER BY InviterName, InviteeName Since you want both a count (aggregate function) and list (non-aggregate function) of names, I would then handle this using counter variables and the CFOUTPUT group parameter: CFOUTPUT query=qNames group=InviterID CFSET Variables.NumberOfPeopleInvited=0 #qNames.InviterName# invited:BR CFOUTPUT CFSET Variables.NumberOfPeopleInvited=Variables.NumberOfPeopleInvited+1 -#qNames.InviteeName#BR /CFOUTPUT -(#Variables.NumberOfPeopleInvited# people total)BR HR /CFOUTPUT HTH, Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: OT- SQL PADDING QUESTION
SELECT MyNumber, TO_CHAR(MyNumber,'000') FROM NUMBERS returns: 1, 001 552,552 1234567,1234567 HTH, Matthieu -Original Message- From: Eric Creese [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 15, 2004 11:33 AM To: CF-Talk Subject: OT- SQL PADDING QUESTION I forget how to do this, it has been some time. I got values that need to be at least 7 characters long. So if the value is 552, I need to pad it out to look like this 552 in my return set. Can anyone out there refresh my memory please. _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
OT: pulling header response variables
All, I am being forced to develop a small module application on my site outside of my normal environment, meaning that I cannot use ColdFusion.(shudder) I am interacting with a plug-in on this other server that includes certain information that I need in the header variables.If I use ColdFusion (which I can only use in development and will not work on the staging and production areas--again, shudder), I can see the variables I need very clearly listed when I do a dump of the CGI variables (CFDUMP var=#CGI#). As I understand it, these are variables that the HTTP server sends back in the header of the page along with the rest of the data in the page.My thinking, perhaps naive, is that this data should be available to the client browser. So, since I can't use CF, I have to use something else.I am getting the sinking feeling that client-side _javascript_ is not an option, although I am still confused as to why this data would not be available to client-side _javascript_. Bottom line: I am looking for another technology to use, but I don't know which way to go.I don't know CGI/Perl, ASP, or client-side _javascript_, so I'll have to study to get this set up.Before I go doing such a thing, I'd like to know that I am at least in the right ballpark. Does anyone have any suggestions for how to deal with this cold, heartless, non-ColdFusion world? Thanks, Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: date difference (DateDiff) question?
cfset timeCallPlacedOnHold = queryTmp.HoldDateTime cfset timeOnHoldReleased = queryTmp.ReleasedDateTime For some reason the dates retuned are in this format: Ex: 2004-09-08 12:28:56.0 I can't understand why it adds the .0 after the time when the value stored in the database is 2004-09-08 12:28:56 The only thing I can think of is to try using the ParseDateTime() function with queryTmp.Hold/ReleasedDateTime to return a good date/time object. Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Comparing two records within the query
Another option is to do a self-join. This works, though I am not getting all rows returned and I haven't quite figured why yet.I hate to rely on the titles being exactly the same.I have data where one title contains the words DVD while the VHS version doesn't. Unfortunately, you are running into a fundamental data identity issue here. Here, identity is a particular movie, regardless of format.The goal of your application is to return a list of identities (as defined above), with available format information included. If you had some unique identifier (similar to ISBN) for movies, something that said 002943018 = What's Eating Gilbert Grape? regardless of whether it was VHS, Beta, DVD, Laserdisc, or celluloid, you could do this comparison flawlessly and easily.Unfortunately, I am guessing that you have no such unique identifier, and further that no such identifier even exists. (Interesting idea: use IMDBs data.They identify What's Eating Gilbert Grape as tt0108550.If you used this, you could even dynamically generate links to IMDB for more information.You would have to create a table of titles and these unique IDs somehow, and this would be a bunch of work, but--as I said--interesting idea.If you link to them, they might not even mind, in which case you could ask them to send you a list of titles and IDs. Again, just a brainstorm.) Back to the issue at hand: if you had such an identifier, you would be all set.But you don't.So, you are using title, which is pretty good.But you have problems.The Manchurian Candidate is not good as an identity: it could mean either the 1962 or the 2004 version.Also, you have this format data appended. I recommend that you add a column to the table that is cleaned title.You then cycle through the database and remove that VHS and DVD note.While you do it, you could create a mediaformat column as suggested before.You could leave the original title as is, if you want, or go to the cleaned title.I see no way around doing at least this. Of course, once you have done that, the question is why you don't have a relational database with one table that holds videos where each row is a unique identity, and another table that holds stock, indicating, among other things, what media format the stock item is. If you don't split the table like this, I would still recommend that you create some sort of internal unique ID that you use to identify a movie entity.Others might know more on this issue, but my guess is that comparing titles (even after the cleaning described above) will be slower than comparing numeric values, thereby leading to faster joins. HTH, Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: DHTML Drag and Drop pt.2
Still struggling with this drag and drop issue. Guy, I would like to help, but as Micha said, we'll need to see a little more of what you are talking about.Can you post it? Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Comparing two records within the query
Another option is to do a self-join.I'll make some assumptions here that may not be true, but which you can modify to fit the truth.Key among those is that you have column called VID_MediaFormat holding either DVD or VHS. (I know you don't have this, but you seem to have some way of determining media_type, so you can just edit this to fit.) SELECT V1.pkVID AS pkVID_DVD, V1.VID_Title AS VID_Title_DVD, V2.pkVID AS pkVID_VHS, V2.VID_Title AS VID_Title_VHS, V1.VID_Title AS SortTitle FROM VIDEOS V1, VIDEOS V2 WHERE V1.VID_MediaFormat = 'DVD' AND V2.VID_MediaFormat = 'VHS' AND V1.pkVID V2.pkVID AND V1.VID_Title = V2.VID_Title (+) UNION SELECT V1.pkVID AS pkVID_DVD, V1.VID_Title AS VID_Title_DVD, V2.pkVID AS pkVID_VHS, V2.VID_Title AS VID_Title_VHS, V2.VID_Title AS SortTitle WHERE V1.VID_MediaFormat = 'DVD' AND V2.VID_MediaFormat = 'VHS' AND V1.pkVID V2.pkVID AND V2.VID_Title = V1.VID_Title (+) AND V1.VID_Title IS NULL ORDER BY SortTitle Here's how it works.The first SELECT statement pulls out all DVD titles in the column called VID_Title_DVD, with matching VHS titles (if they exist) in VID_Title_VHS.The second SELECT statement puts all VHS titles WITHOUT a matching DVD title into VID_Title_VHS, and leaves VID_Title_DVD null.So, the first half gets titles with DVD only or DVD and VHS, and the second half gets VHS only.Finally, the ORDER BY clause uses the SortTitle column (which is the same as VID_Title_DVD in the first SELECT statement and the same as VID_Title_VHS in the second SELECT statement) to order it together. It should return a results list with two columns (plus other stuff) like this: VID_Title_DVDVID_Title_VHS Arthur (DVD)Arthur(VHS) Benji (DVD) Benji (VHS) CHUD (VHS) Dave (DVD) ET (DVD) ET (VHS) Fresh (DVD) Go (DVD) Heat (DVD)Heat(VHS) Ishtar (VHS) Juice (DVD) Juice (VHS) Processing this on output should be easy. HTH, Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: DHTML Drag and Drop pt.2
Guy, One tip on debugging _javascript_: I am sure there is some smart way to do it. I don't know this smart way.I find the errors when they come up in IE. Since the line numbers in the _javascript_ error that comes up (you can get it by double-clicking the little yellow icon in the lower, left-hand corner when you get an error) don't match those in your original code, it gets confusing.So, view the source, copy the entire document, paste it into a blank CFStudio page, and use the line number counts to find your problem line there.This has saved me a lot of time. Of course, if someone knows the smart way to do debug _javascript_, I too would love to know of it. :) Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: cfloop / cfquery and displaying results
Keith, Perhaps I am not understanding correctly, but it sounds like a query within which you group the results is the way to go. You can handle the grouping in a couple of different ways.I would start by reading the help on the CFOUTPUT tag, looking at the group parameter. HTH, Matthieu -Original Message- From: Wurst, Keith D. [mailto:[EMAIL PROTECTED] Sent: Monday, September 06, 2004 3:28 PM To: CF-Talk Subject: cfloop / cfquery and displaying results hi everyone. i have a question concerning cfloop, cfquery and how to display information most effectively on a page. here is the situation. i have two queries. the first query gets all my main topics. the second query gets all my sub topics. my where clause in my second query uses an IN statement and utilizes the valuelist of the results of the first query. in the past what i have done is just performed the first query, and then placed the second query within a cfloop of the results of the first one to display all the sub topics. this time around i want to build a result set on the fly without having to put the second query within my cfloop tag. any suggestions are greatly appreciated. thanks so much. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: More drag and drop
However, I can't seem to get it to work with text unless I select the text not 100% surebut the text could be in a div and the div could have somehting along the lines of John, I'm not sure about the DIV tag that Bryan suggested.It may indeed work. The other way to do it is to wrap the text with an A tag.That's how I did it.In my case, they were actually hyperlinks anyway, but I think that it works the same if you use the A tag with only the name parameter. Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: cfoutput -- group and maxrows problem
cfoutput query=research group=publication_title maxrows=10 #publication_title# cfoutput #author_name# /cfoutput /cfoutput But the maxrows attribute goes by the query record count, rather than the count of unique publication_titles. So instead of seeing 10 records per page, I may get 6 or 9 or 7--the system is counting each author row and thinks it's reached 10 before it actually has. Christy, I don't have a smart and elegant solution.Someone else is bound to post that moments after I post my kludgy solution, which is: Let your query pull more than 10 records (say, 50) and remove the maxrows attribute from your CFOUTPUT tag.Then, change your code to: CFSET i=0 cfoutput query=research group=publication_title CFSET i=i+1 CFIF i lte 10 CFSET LastPubViewed = #publication_id# #publication_title# cfoutput #author_name# /cfoutput /CFIF /cfoutput When you are done, you will have the list limited to ten publications. Further, you'll have the variable LastPubViewed that gives you the last ID you saw.You can use this last ID seen to help you show the next set. (I've always found moving to the next page of such lists tricky.) HTH, Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: DHTML Drag and Drop to reorder record set
I'm not a DHTML guy by any means. Could someone point me in the right direction to figuring out how to use DHTML to take a record from within a record set, drag it to a higher or lower position, and have it change its position within the record set? Guy, I recently set up a drag-and-drop system for moving terms around within a taxonomy structure at a library.I used _javascript_.Requires a bit of doing, but it works really well.I won't go into all the detail, but hopefully I can give you enough to get you started.If you need more, let me know. The basic idea is that each drag and drop event triggers a location.replace() to a new page which processes data in the URL and location.replace()s back to the start page.To the user, the effect is that an operation takes place without leaving the start page. To make this work, you need to understand the _javascript_ drag-and-drop events, paying particular attention to which element fires the event. onDragOver onDragEnter onDragStart onDragEnd onDrop There might be a couple of others, but these are the ones I used. On entering the page, I set a global variable that stores the ID of the element being dragged, first with a dummy value (var dragID = -1;).This global ID is intended to be the place to check what element is being dragged.So, you have to set the onDragStart event to trigger a change in that global variable.If, for example, you have a hyperlinked task item with unique ID 645, you can add > to the a tag.In enableTermDrop(), you set that global variable (dragID) to #TaskItemID#, or 645.Similarly, onDragEnd, you run a routine like disableTermDrop() that sets dragID back to -1.Now, whatever is happening, you always have the ID of the item currently being dragged in dragID. Next, you set the onDrop event of the target elements (those onto which other elements are dropped) to fire something like launchTermDrop().Pass the ID of the target element as an argument.That way, launchTermDrop() has the target (from that argument) and the element that is being dragged and dropped (by reading global variable dragID), and you are in business.Build a URL to a page that knows what to do and location.replace() to that URL. You can make this much more sophisticated by adding more global variables to store other parameters pertaining to the term being dragged.This will usually involve adding many more arguments to the event-driven function calls. VERY IMPORTANT: develop a naming convention early, and stick to it religiously.With the terms drag and drop flying around, and with seven total events that are triggered by different items, this will get confusing very fast.I used the convention drag{VARIABLENAME} for the item being dragged, and target{VARIABLENAME} for the target element. Finally, to get really fancy, you can add keypress sensitivity to the launchTermDrop() routine.This will let you handle the drop differently if the user is holding down the Ctrl key, for example. A bit confusing, but VERY MUCH WORTH IT.You end up with a very slick app. If the tasks being performed are at all repetitive, you get a huge increase in productivity.What used to take several mouse clicks and keystrokes will now take one drag and drop. Good luck! Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: DHTML Drag and Drop to reorder record set
Guy, Thanks for the kind words.The truth is that I learned by reading some tutorial somewhere myself.If I could have remembered where it was, I would have just sent you the link, because it was quite good. That said, my application of what I learned was more specifically geared toward interaction with a ColdFusion-generated database list.If this is something that would be of interest as an article somewhere (Mr. Dinowitz?), I might try putting it together. In any case, thanks again for the praise. Matthieu -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, September 03, 2004 11:09 AM To: CF-Talk Subject: RE: DHTML Drag and Drop to reorder record set Hi Matthieu, That's exactly the launching pad I was hoping for. Not to mention the exact same functionality that I am going for. Your description is excellent and concise. Might you think of doing a tutorial on it for other folks? Thanks again. ~Guy _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Capture cflocations/redirects
I'm experiencing some kind of redirect/cflocation endless loop.Is there some easy way to trap the iterations of this loop so that I can see what is trying to redirect to where? Ian, I don't know if this applies, but when I have confusing and unplanned page-to-page routing, I add a dummy URL variable to suspect statements that do the routing.That allows me to see whether that statement is in fact the one doing the redirecting, since the page it arrives at will have the variable in the URL.Since you have a loop, I would both add this dummy variable and cut the loop somewhere, so that it stops in its tracks.By trial-and-error, you should be able to test each of the redirects. I'm afraid that it's not the easiest way in the world.Still, it shouldn't take more than a few minutes to find the problem. HTH, Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
CFMAIL and mass mailings: problem?
Hi.I want to set up a page to cycle through a list of about 25,000 users and send a personalized e-mail to each of them.I have no need for fancy subscription, opt-out, or other such management features.Also, I am only doing this two or three of times.As such, my plan was to loop over a query, sending each mail separately with the CFMAIL tag. Is this a bad idea? I know that time is an issue: at 1 second per e-mail, 25,000 e-mails takes seven hours.Is the reason that this is a bad idea?What if I do I in smaller chunks?I think that there are tools out there that allow you to do this sort of thing without wreaking havoc.Do people have recommendations? Thoughts? Thanks in advance, Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: currency symbol converter
Joe, Have you looked at LSCurrencyFormat and LSEuroCurrencyFormat?I haven't used them, but I think they might handle your needs. HTH, Matthieu -Original Message- From: joe velez [mailto:[EMAIL PROTECTED] Sent: Thursday, September 02, 2004 1:35 PM To: CF-Talk Subject: currency symbol converter hey is there a way to convert the $ to another character. i have an app that displays the price, but DollarFormat automatically prepends the dollar sign. I have something like cfset cursym = 'euro;' cfoutput#replace(dollarformat(price), '$', cursym, 'ALL')#/cfoutput i was just wondering if anyone had a better way of doing this; and what about currencies where the symbol is at the end, or they use a comma instead of a period to delimit dollars and cents. my replace statement is going to get huge! cfset cursymbol = 'euro;' cfset curdelimiter = ',' cfset dsp_price = '#replace(replace(dollarformat(price), '$', cursym, 'ALL'), '.', curdelimiter, 'ALL')#' cfoutput#dsp_price#/cfoutput Thanks _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Looping Question
Mark, The problem is that your loop index (memberID) is changing, but nothing about the query is.You are repeatedly referring to getRecords.memberID, which, without a CFOUTPUT or CFLOOP tag, will always just give you the first record.In fact, I am surprised that you are doing anything other than updating one record 3500 times, since getRecords.memberID will always pull memberID from the first row of getRecords. Two options for solving this. 1) Loop over the query: CFOUTPUT query=getRecords CFQUERY name=updateRecords... UPDATE #REQUEST.prefix#_Members_LIstBU1 SET directoryPhone = #Replace(getRecords.directoryPhone, -, ,ALL)# WHEREmemberID = #getRecords.memberID# /cfquery /CFOUTPUT 2) Keep your loop the same, but use array notation to get at the different rows in the query: cfloop index=memberID from=1 to=#getRecords.recordcount# cfquery name=updateRecords datasource=#REQUEST.dsnSQL# username=#REQUEST.dsnUID# password=#REQUEST.dsnPWD# UPDATE#REQUEST.prefix#_Members_LIstBU1 SETdirectoryPhone = #Replace(getRecords.directoryPhone[memberID], -, , ALL)# WHEREmemberID = #getRecords.memberID[memberID]# /cfquery /cfloop If you do option 2, I would change your index to something like i to avoid confusion. HTH, Matthieu !--- Get a count of the records prior to insertion --- cfquery name=getRecordsdatasource=#REQUEST.dsnSQL# username=#REQUEST.dsnUID# password=#REQUEST.dsnPWD# SELECT memberID, directoryPhone FROM #REQUEST.prefix#_Members_ListBU1 /cfquery Query Recordcount = cfoutput#getRecords.recordcount#/cfoutputbr / Processing ... cfloop index=memberID from=1 to=#getRecords.recordcount# cfquery name=updateRecords datasource=#REQUEST.dsnSQL# username=#REQUEST.dsnUID# password=#REQUEST.dsnPWD# UPDATE #REQUEST.prefix#_Members_LIstBU1 SET directoryPhone = #Replace(getRecords.directoryPhone, -, , ALL)# WHERE memberID = #getRecords.memberID# /cfquery /cfloop Process Complete. [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: Looping Question
Mark, I think that skipping those records by using IS NOT NULL is fine.The other option is to wrap the CFQUERY tag (that does the update) with CFIF getRecords.directoryPhone is not .../CFIF.Whether the field is literally or is NULL, this CFIF block will skip that update. Matthieu -Original Message- From: Mark Leder [mailto:[EMAIL PROTECTED] Sent: Thursday, September 02, 2004 2:20 PM To: CF-Talk Subject: RE: Looping Question Thanks for your responses. The query that Matt suggested works. One problem however.CF chokes when there is a NULL value or an empty field. In the getRecords query, I can filter by using WHERE directoryPhone IS NOT NULL. But is there a way to filter out records that have an empty value ()? Mark _ From: Cornillon, Matthieu (Consultant) [mailto:[EMAIL PROTECTED] Sent: Thursday, September 02, 2004 1:58 PM To: CF-Talk Subject: RE: Looping Question Mark, The problem is that your loop index (memberID) is changing, but nothing about the query is.You are repeatedly referring to getRecords.memberID, which, without a CFOUTPUT or CFLOOP tag, will always just give you the first record.In fact, I am surprised that you are doing anything other than updating one record 3500 times, since getRecords.memberID will always pull memberID from the first row of getRecords. Two options for solving this. 1) Loop over the query: CFOUTPUT query=getRecords CFQUERY name=updateRecords... UPDATE #REQUEST.prefix#_Members_LIstBU1 SET directoryPhone = #Replace(getRecords.directoryPhone, -, ,ALL)# WHEREmemberID = #getRecords.memberID# /cfquery /CFOUTPUT 2) Keep your loop the same, but use array notation to get at the different rows in the query: cfloop index=memberID from=1 to=#getRecords.recordcount# cfquery name=updateRecords datasource=#REQUEST.dsnSQL# username=#REQUEST.dsnUID# password=#REQUEST.dsnPWD# UPDATE#REQUEST.prefix#_Members_LIstBU1 SETdirectoryPhone = #Replace(getRecords.directoryPhone[memberID], -, , ALL)# WHEREmemberID = #getRecords.memberID[memberID]# /cfquery /cfloop If you do option 2, I would change your index to something like i to avoid confusion. HTH, Matthieu !--- Get a count of the records prior to insertion --- cfquery name=getRecordsdatasource=#REQUEST.dsnSQL# username=#REQUEST.dsnUID# password=#REQUEST.dsnPWD# SELECT memberID, directoryPhone FROM #REQUEST.prefix#_Members_ListBU1 /cfquery Query Recordcount = cfoutput#getRecords.recordcount#/cfoutputbr / Processing ... cfloop index=memberID from=1 to=#getRecords.recordcount# cfquery name=updateRecords datasource=#REQUEST.dsnSQL# username=#REQUEST.dsnUID# password=#REQUEST.dsnPWD# UPDATE #REQUEST.prefix#_Members_LIstBU1 SET directoryPhone = #Replace(getRecords.directoryPhone, -, , ALL)# WHERE memberID = #getRecords.memberID# /cfquery /cfloop Process Complete. _ _ [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
RE: CFMAIL and mass mailings: problem?
The big thing you need to look out for is invalid email addresses and such because that will kill the cfmail loop and thus kill all of the emails going out. John, Does invalid e-mail addresses mean e-mail addresses that simply are not e-mail addresses, or e-mail addresses that are valid in format, but do not actually exist at the other end? In other words, I would call [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]a valid address, even though there is most likely no such address on the yahoo server.Is this how you are defining valid? If so, it sounds like the solution is to check the e-mails using a regular _expression_ to be sure that they follow basic e-mail address format.Does this sound right to you? Thanks, Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]
SOLVED: CFMAIL and mass mailings: problem?
All, I appreciate your answers on this thread.After doing some testing, it looks like I will be able to use CFMAIL with the query attribute set to cycle through messages.To avoid driving the mail server admins to kill me, I will set a scheduler to leak these out in small batches. The regular _expression_ check of the e-mail address will also be key. Thanks again for your help. Matthieu [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]