RE: Dynamic array names HELP!!!!
Create a structure of arrays based on the employee number instead of having dynamic names. EmployeAry = StructNew(); EmployeAry[EmployeeNumber][RowNu_][1] = CalendarInfo.EmployeeNumber[CurRow]; Otherwise you will need the functions ArrayAppend and ArrayInsertAt Pascal -Original Message- From: Mike Hughes [mailto:[EMAIL PROTECTED] Sent: 02 June 2005 05:28 To: CF-Talk Subject: Re: Dynamic array names HELP I need it to work in CF5. We do not have CFMX running on my server, for now. This did work in CFMX but not in CF5. On 6/1/05, James Holmes [EMAIL PROTECTED] wrote: Assuming CFMX, use the array's container struct (probably VARIABLES in this case): VARIABLES[EmployeAry_ EmployeeNumber][RowNu_][1] = CalendarInfo.EmployeeNumber[CurRow]; -Original Message- From: Mike Hughes [mailto:[EMAIL PROTECTED] Sent: Thursday, 2 June 2005 11:06 To: CF-Talk Subject: Dynamic array names HELP Hi all I am building a few arrays on one template using the data from one query. I made the arrays with no problem, but CF is giving me a not a valid variable name error. I need to call and add to an array name Dynamically. // Check to see if it is an array writeoutput(IsArray(Evaluate(EmployeAry_#EmployeeNumber#),2)); This works, but I do not know the Employee Number everytime. EmployeAry_116[#RowNu_#][8] = CalendarInfo.EmployeeNumber[CurRow]; This does not work, But I need to call the Dynamic array names EmployeAry_#EmployeeNumber#[#RowNu_#][1] = CalendarInfo.EmployeeNumber[CurRow]; Can someone give my the right syntax. ~| 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:208326 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: Viewing files in another server/directory outside CF server
cfheader name=Content-Disposition value=inline; filename=#GetFileFromPath(URL.fileX)# cfcontent type=application/msword file=#URL.fileX# deletefile=No Does this work the way you intended?? Pascal -Original Message- From: Michel Deloux [mailto:[EMAIL PROTECTED] Sent: 25 May 2005 16:55 To: CF-Talk Subject: Re: Viewing files in another server/directory outside CF server Thanks Deanna but displaying all files in Mozilla works fine. But with IE that same code, same link, same properties don't. IE displays a Unknown file - Do you want to save, open, cancel, bla bla bla... What's happening? Thanx for your time. 2005/5/24, Deanna Schneider [EMAIL PROTECTED]: That's the proper behavior. If you want them to display in the browser, you'll ned to change your value=attachment; to value=inline; - Original Message - From: Michel Deloux [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Tuesday, May 24, 2005 2:49 PM Subject: Re: Viewing files in another server/directory outside CF server Using CFCONTENT and CFHEADER with MS Word files show me a Save/Download screen in IE. Please look my simple code: view_files.cfm?fileX=file://CA_LA_Fresno/systems/Fresno2004_12.doc in view_files I remove file: and change / bar to \ bar and after:: cfheader name=Content-Disposition value=attachment; filename=#URL.fileX# cfcontent type=application/msword file=#URL.fileX# deletefile=No Whta's happened? Thanx ~| 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:207650 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: cfif with AND and OR statements
What are you trying to achieve?? You should see table 1 on page.cfm and if there is a url parameter named ItemNumber that isn't 12345. At least, that is what you wrote. Pascal -Original Message- From: Cameron Johnson [mailto:[EMAIL PROTECTED] Sent: 25 May 2005 17:23 To: CF-Talk Subject: cfif with AND and OR statements I've got the following cfif statement in one of my header pages: cfif (isDefined(URL.ItemNumber) AND URL.ItemNumber NEQ 12345) OR (CGI.SCRIPT_NAME NEQ '/page.cfm') show table 1 cfelse show table 2 /cfif Here are my scenarios: - when the cfif is combined into one statement, it works correctly (meaning I see table 2) when browsing to /page.cfm. But it doesn't work when browsing to index.cfm?ItemNumber=12345 - if I split the statement into two cfif statements, I see table 2 on both /page.cfm and index.cfm?ItemNumber=12345 Any ideas why it's not working on index.cfm?ItemNumber=12345 when the statement is combined? Is something wrong with the cfif that I'm not seeing? Appreciate the help. - Cameron ~| 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:207656 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: Viewing files in another server/directory outside CF server
The final user does not need access to that folder, just CF. Let's say I want to access a file C:\docs\test.doc, but the user doesn't have access to C:\docs. CF has access to it, and the user has access to a CF application in the webroot. Create a file download.cfm under the webroot somewhere and pot the following code in it: cfheader name=Content-Disposition value=attachment; filename=test.doc cfcontent type=application/msword file= C:\docs\test.doc deletefile=No This should enable the users to download the file by calling download.cfm. You have to make sure that coldfusion has access to the folder. Sandbox security may also prevent this, but then you have to talk to the server admin. -Original Message- From: Michel Deloux [mailto:[EMAIL PROTECTED] Sent: 24 May 2005 13:01 To: CF-Talk Subject: Re: Viewing files in another server/directory outside CF server Thank you Pascal for your answer. But don't work for us. With CF I(administrator user) can view all files stored in that protected dir/server. But final user(without rights for read/write) don't... Using cflocation, cffile with read and after write, all fails... Do you have other choice? Can help us? Thanks for your time. 2005/5/23, Pascal Peters [EMAIL PROTECTED]: Use cfcontent to do that cfheader name=Content-Disposition value=attachment; filename=#attributes.filename# cfcontent type=#attributes.mimetype# file=#attributes.file# deletefile=No Pascal -Original Message- From: Michel Deloux [mailto:[EMAIL PROTECTED] Sent: 23 May 2005 16:54 To: CF-Talk Subject: Viewing files in another server/directory outside CF server Hi all I can upload files to CA_LA_Fresno server using CF user. CF user haves administrator properties. But my user don't have permission to access that server/directory. It's possible to my users see that file in your browser or Word? How? Thanks in advance ~| 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:207525 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: Viewing files in another server/directory outside CF server
Use cfcontent to do that cfheader name=Content-Disposition value=attachment; filename=#attributes.filename# cfcontent type=#attributes.mimetype# file=#attributes.file# deletefile=No Pascal -Original Message- From: Michel Deloux [mailto:[EMAIL PROTECTED] Sent: 23 May 2005 16:54 To: CF-Talk Subject: Viewing files in another server/directory outside CF server Hi all I can upload files to CA_LA_Fresno server using CF user. CF user haves administrator properties. But my user don't have permission to access that server/directory. It's possible to my users see that file in your browser or Word? How? Thanks in advance ~| 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:207423 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: Display Automated tasks in CF5
Not for CF5, you can use cfregistry to get them. cfregistry action=getall branch=HKEY_LOCAL_MACHINE\SOFTWARE\Allaire\ColdFusion\CurrentVersion\Sc hedule type=key name=qTest watch out for the wrap in the branch Pascal -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:Neil.Robertson- [EMAIL PROTECTED] Sent: 19 May 2005 14:44 To: CF-Talk Subject: RE: Display Automated tasks in CF5 cfobject type=JAVA action=Create name=factory class=coldfusion.server.ServiceFactory cfset allTasks = factory.CronService.listAll() cfset numberOtasks = arraylen(allTasks) cfloop index=i from=1 to=#numberOtasks# cfoutput #allTasks[i].task# /cfoutput /cfloop cfdump var=#allTasks# ~| 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:207145 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: Strip end to end
If you just want to replace them, you can simplify. This will replace all opening and closing tr, td or th tags with an empty string (CFMX+ only). cfset noHtml = reReplaceNoCase(htmlString, /*t[rhd]\b.*?, , all) Pascal -Original Message- From: Jared Rypka-Hauer - CMG, LLC [mailto:[EMAIL PROTECTED] Sent: 18 May 2005 10:18 To: CF-Talk Subject: Re: Strip end to end Try something like this: cfset noHtml = reReplaceNoCase(htmlString, /*t[rhd]\s*\w*=**\w**, , all) Worked in my tests... Laterz! J On 5/18/05, Parker, Kevin [EMAIL PROTECTED] wrote: How do I identify TR and TD tags end to end for the purposes of replacing them with alternative content. I am using CFSAVECONTENT to grab a section of a page and re-process it. For example in my variable how do I identify tr height=18 irrespective of its length and content and replace it with or something or how do I identify td colspan=2 again irrespective of length and content, and replace it with or something. /TR and /TD tags aren't a problem of course. TIA ++ Kevin Parker Web Services Consultant WorkCover Corporation -- --- - Buy SQLSurveyor! http://www.web-relevant.com/sqlsurveyor Never make your developers open Enterprise Manager again. ~| 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:207005 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: Retrieving Variable Values Dynamically
form[ListGetAt(form.FocusAreas,2)] Pascal -Original Message- From: Graham Pearson [mailto:[EMAIL PROTECTED] Sent: 15 May 2005 14:53 To: CF-Talk Subject: Retrieving Variable Values Dynamically How does one go about getting the values of of a form structure based on a comma separated list of FORM.FocusAreas. The focus areas can have a maximum of 4 areas within it and will also have a corresponding form structure with the Record ID Numbers for this area. At the present time when I try to dump position 2 of focus areas I currently get audit_id instead of the comma seperated list. Anyone have an idea on how I can get the list so I can perform a query to get the Description of the specific record numbers from the specific audit table. My Form Structure is audit_cd: 3,4,7,9 audit_id: 1,2,4,7,8,9,10 FocusAreas: audit_cd, audit_id Any Ideas? -- ~| 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:206733 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: hierarchal invites
If you are using Oracle, you can use CONNECT BY. Pascal -Original Message- From: Andy Jarrett [mailto:[EMAIL PROTECTED] Sent: 12 May 2005 13:18 To: CF-Talk Subject: hierarchal invites Hi, I've got a problem with one of my new sites. Im trying to create in invite only site with a hierarchal level system in it. So for example. a invites b and c b invites d,e,f and c invites g,h,i How to structure the DB is where im getting stuck? I can see a couple of ways of doing it but to get all the users under 'a' would require a stupid amount of cfqueries and cfloops. Has anyone set up this kind of scenario or could give a few pointers ? Cheers -- Andy J www.andyjarrett.co.uk I had 50 Gmail Invites, i got rid of them, i now have 50 more. If you want any amount drop me a line ~| 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:206512 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: link validation ?
It's not URLEncodedFormat but HTMLEditFormat that you need to use. This will replace characters like with their html codes Pascal. -Original Message- From: dave [mailto:[EMAIL PROTECTED] Sent: 11 May 2005 10:00 To: CF-Talk Subject: Re: link validation ? makes sense, being thats were the problems begin. I did try to urlencodeformat it by setting the whole link via variable but that opened up a new window and added the main sites url first which of course didnt work. But when I wake I will try just the part you say. Thanks Kay :) ~Dave the disruptor~ From: Kay Smoljak [EMAIL PROTECTED] Sent: Wednesday, May 11, 2005 3:55 AM To: CF-Talk cf-talk@houseoffusion.com Subject: Re: link validation ? On 5/11/05, dave wrote: how can I make a link like this validate xhtml? map it encode the ampersand - searchtype=addresscountry= and before you ask, yes that DOES work :) -- Kay Smoljak http://kay.smoljak.com/ ~| 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:206319 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
OT: Javascript question...
divName.innerHTML += some new text + br/; This should work Pascal I want to manipulate the innerText property of a div tag. It works fine except that I can't seem to put in a linefeed or break. I tried all the following without success. Does anyone know how to get a linebreak in there? -mark divName.innerText = divName.innerText + some new text + br/; divName.innerText = divName.innerText + some new text + /n; divName.innerText = divName.innerText + some new text + chr(10); divName.innerText = divName.innerText + some new text + chr(13); --- Mark A. Kruger, CFG, MCSE www.cfwebtools.com www.necfug.com http://mkruger.cfwebtools.com ~| 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:206183 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: Anchors and CFLOCATION
Use firefox and liveHttpHeaders to track them. -Original Message- From: Burns, John D [mailto:[EMAIL PROTECTED] Sent: 02 May 2005 22:45 To: CF-Talk Subject: RE: Anchors and CFLOCATION I haven't traced the headers yet. That was the next step I was going to follow. What would you suggest for doing this? CF or do you have another tool? The URL is internal so I can't pass it along. Believe me, I wish I could :-) John Burns Certified Advanced ColdFusion MX Developer Wyle Laboratories, Inc. | Web Developer -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Monday, May 02, 2005 3:12 PM To: CF-Talk Subject: Re: Anchors and CFLOCATION Burns, John D wrote: Well, I know that's not true because it's working on some cflocation tags with a query string and an anchor. At least, it works on IE 6. That's the weirdest thing is that there are other items on the same page that work fine doing the EXACT same code, but not this one. I can't tell if it's a CF problem, a fusebox problem, an HTML problem or a combination of some sort. Have you traced the HTTP headers? Do you have a URL? Jochem ~| 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:205351 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: level 1, level 2
/images/ ?? or define a variable with the path to images. Pascal -Original Message- From: Daniel Kessler [mailto:[EMAIL PROTECTED] Sent: 03 May 2005 14:57 To: CF-Talk Subject: level 1, level 2 I have a directory on my site which is basically a site in itself. There, I am building a template. In this template is a header with images and links. The problem is that the path to those images and links changes depending on whether the file the header is in is down one level or two or none. This changes the path to: images/ or ../images/ or .../../images/. The same goes for the links. To accommodate that, I've been building a header for each level, header_1, header_2, header_n. This doesn't seem to be an efficient way to go about it. What's a better way? -- Daniel Kessler Department of Public and Community Health University of Maryland Suite 2387 Valley Drive College Park, MD 20742-2611 301-405-2545 Phone www.phi.umd.edu ~| 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:205363 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: level 1, level 2
In the application.cfm, you can set a variable that holds the absolute path to the image folder (or the path starting from the root). Then use that variable when you need the path to an image. I usually create a structure that holds parameters that depend on the server. Something like: request.app.dsn request.app.imgFolder request.app.rootFolder request.app.rootUrl request.app.mapping I create them in a separate file that I include in the application.cfm. I have a different file for every server (local, dev, staging, prod, ) where the application is deployed. -Original Message- From: daniel kessler [mailto:[EMAIL PROTECTED] Sent: 03 May 2005 15:22 To: CF-Talk Subject: RE: level 1, level 2 Wouldn't /images/ refer to the images directory on the root level? This is a directory within and the whole site is there. In what way would I define a variable for a path to the images. It would seem to me that the variable would have to change just like the header. Can you give me a small example? sorry to be dense about it. /images/ ?? or define a variable with the path to images. Pascal ~| 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:205369 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: Combining verity results with database query
Did you try SELECT dbr.PrimaryID AS PrimaryID, vr.Score AS Score ... Pascal -Original Message- From: George Abraham [mailto:[EMAIL PROTECTED] Sent: 03 May 2005 16:34 To: CF-Talk Subject: Re: Combining verity results with database query I toyed around with this code for some time. It is almost as if it does not see that second table (or resultset) which is being joined. For example, if this is the code: SELECT PrimaryID, Score FROM dbResults dbr INNER JOIN verityResults vr ON vr.key = dbr.PrimaryID ORDER BY vr.Score then it throws an error that says Score does not exist in dbResults. Well, no it does not, that is why I am joining on verityResults which is where it exists. Here is how the tables look. dbResults Column1: PrimaryID Column2: Data2 Column3: Data3 Column4: Data4 verityResults Column1: Key Column2: Score Column3: Body and so on. This code works: SELECT * FROM dbResults dbr INNER JOIN verityResults vr ON vr.key = dbr.PrimaryID ORDER BY vr.Score But then it shows me only the columns from dbResults. If I reverse the order of the join, then it shows me only the columns from verityResults. By the way, should mention that I am running CF 5 on Windows 2003 Server. Hasn't anybody ever wanted to preserve scores from their verity searches and then wanted to combine that with database results? George On 5/3/05, George Abraham [EMAIL PROTECTED] wrote: It's that last combination that is not working for me. I try to refer to the results from the verity resultset joined on the results from the database (based on a PrimaryID) and I get an error that the SQL is bad. Has anybody ever done this? Here is the SQL code: SELECT dbResults.*, vr.Score FROM dbResults dbr INNER JOIN verityResults vr ON vr.key = dbr.PrimaryID ORDER BY vr.Score George ~| 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:205380 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: Combining verity results with database query
And did you try it without table aliases and with the join in the where clause: SELECT dbResults.primaryID AS primaryID, verityResults.score AS score FROM dbResults, verityResults WHERE dbResults.primaryID = verityResults.key ORDER BY verityResults.score DESC This has definitely worked for me in the past (on CF5) Pascal -Original Message- From: George Abraham [mailto:[EMAIL PROTECTED] Sent: 03 May 2005 16:46 To: CF-Talk Subject: Re: Combining verity results with database query Yep, tried that too. Another thing I just noticed is that it does not like the dot notation as in dbr.PrimaryID or whatever. It gives this error: ERROR Query Manipulation Error Code = 0 Invalid SQL SQL = SELECT dbr.* FROM dbResults dbr INNER JOIN verityResults vr ON vr.key=dbr.PrimaryID Data Source = The error occurred while processing an element with a general identifier of (CFQUERY) /ERROR George ~| 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:205383 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: longer than a varchar2
CLOB -Original Message- From: Daniel Kessler [mailto:[EMAIL PROTECTED] Sent: 29 April 2005 13:13 To: CF-Talk Subject: longer than a varchar2 I have some text that I need to keep for a database of questions. Some of this text is expected to be 5000-6000 characters. In oracle, I tried to make a varchar2(5000), but it gave me an error saying that it was too large. From searching, I've found the limit to be 4000. What now? I think that what I've read is that I need a LONG, but it wasn't clear if this was for binaries or not. If so, it seems like overkill for just 5000 chars. So, I'm looking for advice here. What type of column should I be making here? thanks. -- Daniel Kessler Department of Public and Community Health University of Maryland Suite 2387 Valley Drive College Park, MD 20742-2611 301-405-2545 Phone www.phi.umd.edu ~| 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:205052 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: Cfloop collection
option value=#companyID##SESSION.companyIDList[companyID].companyName #/option But why don't you just use the query? Pascal -Original Message- From: Mark Leder [mailto:[EMAIL PROTECTED] Sent: 29 April 2005 15:19 To: CF-Talk Subject: Cfloop collection Hi all, I want to loop a structure and present the output in a form list select. I'm able to put the query in a structure and dump it successfully, but the cfloop collection code keeps throwing errors. How do I fix this? BTW: each companyID is a UUID string; the QueryToStructofStructures is from CFLib. !--- Page that creates the structure --- SESSION.companyIDList = StructNew(); SESSION.companyIDList = #QueryToStructOfStructures(qCompanyRecords,companyID)#; !--- Form page --- form select name=companyID option value=0- Select A Company/option cfloop collection=#SESSION.companyIDList# item=companyID option value=#SESSION.companyIDList.companyID##SESSION.companyIDList.company Na me #/option /cfloop /select /form ~| 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:205069 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: RegEx to manipulate html tags
REReplace(str, '(img\s[^]*src=)image1\.jpg([^]*)', \1image2.jpg\2, all) Pascal -Original Message- From: Howie Hamlin [mailto:[EMAIL PROTECTED] Sent: 27 April 2005 00:52 To: CF-Talk Subject: RegEx to manipulate html tags Does anyone know of a regex that I can use to replace parameters in the tags of an html page? For example, I would want to replace the SRC parameter of an IMG tag but the SRC parameter is not located in the same postition of the IMG tag each time. So, as an example: img src=image1.jpg img height=100 width=100 src=image1.jpg should both be converted to: img src=image2.jpg img height=100 width=100 src=image2.jpg If the SRC parameter were always located after the IMG tag start (as in the first example) then I could use a simple findnocase but that's not the case. Thanks, -- Howie Hamlin - inFusion Project Manager On-Line Data Solutions, Inc. - www.CoolFusion.com inFusion Mail Server (iMS) - The Award-winning, Intelligent Mail Server PrismAV - Virus scanning for ColdFusion and BlueDragon applications Find out how iMS Stacks up to the competition: http://www.coolfusion.com/imssecomparison.cfm ++ ++ iMS-Lite - the completely free mail server solution for applications and application servers http://www.coolfusion.com/iMSLite ++ ++ ~| 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:204633 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: Frames woes
You have /frame instead of /frameset Pascal -Original Message- From: Allan Cliff [mailto:[EMAIL PROTECTED] Sent: 27 April 2005 11:33 To: CF-Talk Subject: Frames woes Trying to get a set of frames centred on the page based on a 800x600 design for all possible resolutions http://www.cfugspain.org/test/ Why is the bottom frame in grey (IE) / white (Firefox) when it is the same file called in every frame? index.htm HTML HEAD/HEAD FRAMESET ROWS=*,550,* FRAME SRC=blank.htm NAME=blanktop ID=blanktop SCROLLING=No FRAMESET COLS=*,768,* FRAME SRC=blank.htm NAME=blankleft ID=blankleft SCROLLING=No FRAME SRC=blank.htm NAME=blankcentre ID=blankcentre SCROLLING=No FRAME SRC=blank.htm NAME=blankright ID=blankright SCROLLING=No /FRAME FRAME SRC=blank.htm NAME=blankbottom ID=blankbottom SCROLLING=No /FRAME /HTML blank.htm HTML HEAD/HEAD BODY BGCOLOR=red/BODY /HTML Damn I hate frames. Thanks Allan ~| 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:204638 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: nest #
#variables[productrange id].name# Pascal -Original Message- From: Maxwell Smart [mailto:[EMAIL PROTECTED] Sent: 25 April 2005 11:58 To: CF-Talk Subject: nest # I'm trying to output the results of a query similar to: #productrange1.name# however I would like to increment the 1 based on the ID of another table such as #productrange#ID#.name# however obviously this is not allowed. any suggestions please? thanks. ~| 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:204239 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: Extracting Data From a Webpage Using RegEx
Txt = REReplaceNoCase(cfhttp.filecontent,'.*td style=width:640px; valign=top class=hafas(.*)td style=width:150px; valign=top class=posInformationen.*',\1) This should do it. Not tested. Watch out for wrap in email. Pascal -Original Message- From: oscar dim [mailto:[EMAIL PROTECTED] Sent: 21 April 2005 11:00 To: CF-Talk Subject: Extracting Data From a Webpage Using RegEx Hello I do need to extract some data off of certain page. I do this with CFHTTP. The variable returned as string object is: Page = CFHTTP.FileContent As mentioned in another thread but unfortunatelly not very easy to get working for my specific needs I think I'll have to use a regular expression to extract the values that I am after, this is the part that I'm not sure about at all. All I have is the unique starting html tag 'td style=width:640px; valign=top class=hafas' and ending html tag 'td style=width:150px; valign=top class=posInformationen', too. All text and html between these two literals must be found, I need to extract ALL between these two tags... I'm really not sure at all on how to get started on this, so any help would be appreciated. Regards. Oscar ~| 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:203793 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: RegEx - help
REReplaceNoCase(str,(select|textarea)\b.*?/\1,,all) This works only for tags that have a closing tag and if the tags aren't nested. Pascal -Original Message- From: Robertson-Ravo, Neil (RX) [mailto:Neil.Robertson- [EMAIL PROTECTED] Sent: 14 April 2005 12:38 To: CF-Talk Subject: RegEx - help Anyone got a RegEx to strip out certain HTML tags (and content between them). I have a working StripHTML UDF now but I require one which can say remove this in its entirety: select name=foo option value=pingpong/option /select Any RegEx gurus out there switched on today? TIA This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant, Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business, Registered in England, Number 678540. It contains information which is confidential and may also be privileged. It is for the exclusive use of the intended recipient(s). If you are not the intended recipient(s) please note that any form of distribution, copying or use of this communication or the information in it is strictly prohibited and may be unlawful. If you have received this communication in error please return it to the sender or call our switchboard on +44 (0) 20 89107910. The opinions expressed within this communication are not necessarily those expressed by Reed Exhibitions. Visit our website at http://www.reedexpo.com ~| 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:202754 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: Regex help
Replace the Mid() by RemoveChars(qs, stuff.pos[1], stuff.len[1]) And it should work Pascal -Original Message- From: Jim McAtee [mailto:[EMAIL PROTECTED] Sent: 13 April 2005 03:01 To: CF-Talk Subject: Regex help (CF5 on IIS, Win2k Server) I have a CF template set up as the IIS 404 error handler on a web site. When IIS detects a 404 error it calls the CF page and passes the original request within the CGI variable cgi.query_string in the following form: 404;http://www.mydomain.com/missingpage.htm or if the request was for a directory it might look like: 404;http://www.mydomain.com/missingdirectory/ In my template I need to extract what would have been the original cgi.path_info: /missingpage.htm or /missingdirectory/ What might a CF function look like using regexes to extract the trailing part of the URL? There will be many different host (domain) names pointed at the site, so I can't match the domain name. The function would be called by passing cgi.query_string: cfset path_info = getPathInfo(cgi.query_string) The function below is start, but it matches the entire string rather than extracting just the end part. function getPathInfo(qs) { var re = '404;http://[^/]+/*'; var stuff = REFindNoCase(re, qs, 1, 'yes'); if (stuff.pos[1]) { return Mid(qs, stuff.pos[1], stuff.len[1]); } else { return ''; } } ~| 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:202528 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: regex help for grabbing values of html tag attributes
Google doesn't put quotes around most attributes. The following works (takes single or double quotes or even no quotes into consideration). Watch out for wrapping in the regular expressions. It allows you to find the value of 1 attribute in one or more tags (see examples). cfscript function GetAttributeValue(str,tag,attr){ var regexp = (#tag#)\s[^]*#attr#=('.*?'|.*?|[^\s]+)[^]*; var aReturn = ArrayNew(1); var start = 1; var stTmp = StructNew(); while(true){ stTmp = REFindNoCase(regexp,str,start,true); if(stTmp.pos[1] IS 0) break; ArrayAppend(aReturn,REReplace(Mid(str,stTmp.pos[3],stTmp.len[3]),^['] (.*)[']$,\1)); start = stTmp.pos[1] + stTmp.len[1]; } return aReturn; } /cfscript cfhttp url=http://www.google.com/; throwonerror=yes/cfhttp cfoutput#HTMLCodeFormat(cfhttp.filecontent)#/cfoutput cfdump var=#GetAttributeValue(cfhttp.filecontent,'a','href')# cfdump var=#GetAttributeValue(cfhttp.filecontent,'img','src')# cfdump var=#GetAttributeValue(cfhttp.filecontent,'a|td','class')# Pascal -Original Message- From: Burns, John D [mailto:[EMAIL PROTECTED] Sent: 22 March 2005 22:59 To: CF-Talk Subject: RE: regex help for grabbing values of html tag attributes Ben, I can see what you've got (I think) and it makes sense, but for some reason, it's not working. I'm grabbing the html from www.google.com and running it on it and this is what I've got in my code: #refindnocase('img.*?src=(.*?).*?',cfhttp.fileContent,0,true)# I'm using cfdump to display that info and what I see are 2 arrays (len and pos) and both have values of 1 and 0. I thought that if the first value was 1, the second value would be the position of the occurrence of the search string. I know google has an image, and I'm displaying the cfhttp.filecontent in a textarea above so that I can ensure the results are coming back as expected. Any ideas? Am I doing something wrong? John Burns Certified Advanced ColdFusion MX Developer Wyle Laboratories, Inc. | Web Developer -Original Message- From: Ben Doom [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 22, 2005 4:54 PM To: CF-Talk Subject: Re: regex help for grabbing values of html tag attributes Well, I see a couple of problems with what you're using. First, you've not got a closing on the attribute. Second, you've wrapped a regex that contains a in 's, which will error out if you don't escape the inner 's. You can wrap it with single quotes to fix that. Also, the last * boggles me. I don't know why it's there. Or, try this: '#tag#.*?#att#=(.*?).*?' where (should be obvious) tag and att are defined as the tag and attribute you want. Please note that if you define them as span and class and you have this: spanstuff in betweenspan class=bob the whole tag match will return both span tags and the stuff in between. The attribute match will return bob. So, if this might be the case, lemme know and we'll tweak the regex. Not tested, your miles may vary, trix are for kids, etc. --Ben Burns, John D wrote: 6.1. I was looking at the archives and have come up with this but it's erroring I'm using the img instance because it's easier to test on pages that have multiple images... #refindnocase(img[^]*src=([^]*)*,cfhttp.fileContent,0,true)# ~| 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:199743 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: regex help for grabbing values of html tag attributes
Google doesn't put quotes around most attributes. The following works (takes single or double quotes or even no quotes into consideration). Watch out for wrapping in the regular expressions. It allows you to find the value of 1 attribute in one or more tags (see examples). cfscript function GetAttributeValue(str,tag,attr){ var regexp = (#tag#)\s[^]*#attr#=('.*?'|.*?|[^\s]+)[^]*; var aReturn = ArrayNew(1); var start = 1; var stTmp = StructNew(); while(true){ stTmp = REFindNoCase(regexp,str,start,true); if(stTmp.pos[1] IS 0) break; ArrayAppend(aReturn,REReplace(Mid(str,stTmp.pos[3],stTmp.len[3]),^['] (.*)[']$,\1)); start = stTmp.pos[1] + stTmp.len[1]; } return aReturn; } /cfscript cfhttp url=http://www.google.com/; throwonerror=yes/cfhttp cfoutput#HTMLCodeFormat(cfhttp.filecontent)#/cfoutput cfdump var=#GetAttributeValue(cfhttp.filecontent,'a','href')# cfdump var=#GetAttributeValue(cfhttp.filecontent,'img','src')# cfdump var=#GetAttributeValue(cfhttp.filecontent,'a|td','class')# Pascal -Original Message- From: Burns, John D [mailto:[EMAIL PROTECTED] Sent: 22 March 2005 22:59 To: CF-Talk Subject: RE: regex help for grabbing values of html tag attributes Ben, I can see what you've got (I think) and it makes sense, but for some reason, it's not working. I'm grabbing the html from www.google.com and running it on it and this is what I've got in my code: #refindnocase('img.*?src=(.*?).*?',cfhttp.fileContent,0,true)# I'm using cfdump to display that info and what I see are 2 arrays (len and pos) and both have values of 1 and 0. I thought that if the first value was 1, the second value would be the position of the occurrence of the search string. I know google has an image, and I'm displaying the cfhttp.filecontent in a textarea above so that I can ensure the results are coming back as expected. Any ideas? Am I doing something wrong? ~| 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:199744 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: Extracting/Replacing URL's from text
Regexp can do it for you: cfscript newurl = new url to prepend/; regexp = (a\s[^]*href=)(.*?)([^]*); newtext = REReplaceNoCase(text,regexp,\1#newurl#\2\3,all); /cfscript This only takes links into consideration and the url has to be surrounded by double quotes. If the href attribute can have double, single or no quotes around the value, it needs a bit more work (a loop). You can get inspiration from my post in the thread regexp help ... from this morning (http://www.houseoffusion.com/lists.cfm/link=i:4:199744). Pascal -Original Message- From: Dave Phillips [mailto:[EMAIL PROTECTED] Sent: 23 March 2005 08:37 To: CF-Talk Subject: RE: Extracting/Replacing URL's from text Actually, this is a bit too simplified because what I needed was a way to search for url's in a body of text without knowing what they are. Here's what I came up with...a little custom tag called CF_GetLinkList. ~| 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:199745 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: nesting variables...
OR avoid the problem altogether cfquery name=countryName datasource=#datasource# select #region# AS myregion from location where id = #form.location# /cfquery #countryName.myregion# Pascal -Original Message- From: Kerry [mailto:[EMAIL PROTECTED] Sent: 23 March 2005 13:28 To: CF-Talk Subject: RE: nesting variables... #countryName[region][countryName.currentrow]# -Original Message- From: Protoculture [mailto:[EMAIL PROTECTED] Sent: 23 March 2005 11:15 To: CF-Talk Subject: nesting variables... I have defined a variable earlier in my template titled region. and it equals a string of my location... ie. CAN or US. I also have a query titled countryName. cfquery name=countryName datasource=#datasource# select #region# from location where id = #form.location# /cfquery So how could I use that region varible in order to access the data retrieved from my query like so below ( both versions throw an error )... #countryName[region]# OR #countryName[#region#]# ~| 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:199749 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: cftransaction behavior
It's expected behavior. The /cftransaction from CFTRANSACTION action=BEGIN will automatically commit if no error occurred or rollback if an error occurred. Pascal -Original Message- From: Cliff Meyers [mailto:[EMAIL PROTECTED] Sent: 22 March 2005 17:23 To: CF-Talk Subject: cftransaction behavior I've noticed some behavior from CFTRANSACTION that I wouldn't quite expect. Here is some pseudo code: CFSET transactionSuccess=false CFTRANSACTION action=BEGIN CFTRY many CFQUERY tags CFSET transactionSuccess=true CFCATCH CFTRANSACTION action=ROLLBACK /CFCATCH /CFTRY CFIF transactionSuccess CFTRANSACTION action=COMMIT /CFIF /CFTRANSACTION If I comment out the CFTRANSACTION action=COMMIT tag and the query completes without errors, the data is still written to the database. Shouldn't I have to explicitly use COMMIT in order for the data to be saved? At first glance it seems that the only time I'd want to ROLLBACK is in the event of an error, but if this is the expected behavior I'm not sure why I'd ever need to use CFTRANSACTION action=COMMIT. Anyone have any ideas? I'm using CFMX 6.1 on Solaris 9 with Oracle 9i Release 2. -Cliff ~| 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:199672 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: when delivering a file with cfcontent.
cfheader name=Content-Disposition value=attachment; filename=myfile.doc cfcontent type=application/unknown file=E:\hosting\oursite\ourfiles\myfile.doc deletefile=No Pascal -Original Message- From: Protoculture [mailto:[EMAIL PROTECTED] Sent: 07 March 2005 10:49 To: CF-Talk Subject: Re: when delivering a file with cfcontent. I did that... but the only thing is now its saving whats supposed to be a word doc... as the name of the current template( ie. 'current_template.cfm' as opposed to 'myfile.doc'. cfcontent file=E:\hosting\oursite\ourfiles\myfile.doc type=unknown reset=yes/ ~| 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:197648 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: Replacing variable text in a string
To avoid space issues (or numbers with more or less than 3 digits) #REReplaceNoCase(DisplaySql,set\s+primary_assign_id\s*=\s*\d+,,ALL )# Thera re no spaces att all in this regexp (in case the email text gets wrapped in the wrong place) Pascal -Original Message- From: Mickael [mailto:[EMAIL PROTECTED] Sent: 02 February 2005 12:14 To: CF-Talk Subject: Re: Replacing variable text in a string Please disregard Ryan, This is working fine, it seems that I left out a space before the Digit statement. Thanks ~| 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:192747 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: isUserInRole takes multiple roles?
It can take a list, but it works as an AND (the user needs ALL the roles in the list). If you want OR, there was a simple IsUserInAnyRole() UDF by Raymond Camden I believe. Pascal -Original Message- From: Alex Sherwood [mailto:[EMAIL PROTECTED] Sent: 02 February 2005 14:54 To: CF-Talk Subject: isUserInRole takes multiple roles? Question: Does the inUserInRole() function take a list of roles or a single role? The Complete ColdFusionMX Reference has an example where multiple roles are passed in, but I cannot get it to work. I find it hard to believe that they would publish an example that would be incorrect (an not due to a typo). Thanks, -- Alex Sherwood Director, Internet Services PHS Collection Agency Phone: 813-283-4579 Web: www.phs-net.com ~| 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:192755 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: ORDER BY on a query within a query
Daniel Due to how and wen rownum is defined, I believe you have to do it like this in oracle. SELECT * FROM ( SELECT t.*, ROWNUM AS RN FROM ( SELECT ... FROM... WHERE 1 = 1 ... ORDER BY #UPPER(article) ) t WHERE ROWNUM = cfqueryparam value=#url.end_num# cfsqltype=cf_sql_integer ) WHERE RN = cfqueryparam value=#url.begin_num# cfsqltype=cf_sql_integer Pascal Peters -Original Message- From: Daniel Kessler [mailto:[EMAIL PROTECTED] Sent: 27 January 2005 19:30 To: CF-Talk Subject: ORDER BY on a query within a query I have a query in a query that grabs all the hits and then returns the first 10 (thanks again folks!). It does an ORDER BY on agency which is an Oracle varchar2(100). The ORDER BY is in the first query and the second query just grabs 10 at a time. Largely it does this correctly, but I've noticed some oddities with the ordering. First, it seems to order caps and lowercase separately like a1, a2, A1, A2 and it seems order them within the 10 instead of within the whole (I think). Also, if you go here: http://hhp.umd.edu/studentservices/internships.cfm and click search for a blank search, it provides a search list with agencies 1-9 begin with an a while agency 10 begins with a d. Click on page 2 and agencies 11-20 begin with an a.I added an UPPER to the inner query ORDER BY to try and fix it, but it didn't. Seems right to me though. ~| 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:192071 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: ORDER BY on a query within a query
There could be a number of reasons why it isn't showing. Maybe debug isn't activated for your IP. Or maybe it is blocked at the app level. Or maybe database activity isn't checked. Pascal -Original Message- From: daniel kessler [mailto:[EMAIL PROTECTED] Sent: 28 January 2005 12:28 To: CF-Talk Subject: Re: ORDER BY on a query within a query Can you show us what Oracle is getting? the query from the debug output? I put debug=yes in the cfquery line, but I didn't see a change in the display. I expected some sql output. cfquery name=getSearchItem datasource=dph debug=yes ~| 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:192073 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: ORDER BY on a query within a query
I could do both = and = at the end like Deanna (it is just the = that fails in the 2nd query). I do the = in the 2nd because the result set returned from that query is likely to be smaller than if I do it in the 3rd query. The end result is exactly the same You need 3 queries because ROWNUM is assigned before the ORDER BY and you can't do ROWNUM = x (this will simply be ignored) SO: 1st query = get all possible records sorted 2nd query = create a query with ROWNUM saved in it (RN) 3rd query = get the rows you need (using RN to filter) Pascal In this setup, it all works great, at least for 1 through 10 but it's an example. The second step SELECT t.*, ROWNUM AS RN does the trick. I'm not sure why this works though. Pascals does the WHERE differently in that one part of the WHERE is in the middle (2nd) query. The order of the WHERE appears to be necessary in this way, rather than having both parts of the WHERE at the end. - So, I get the whole recordset and alphabetize, which I'd done before. - Then, I take that recordset and grab the whole thing again, but this time get a ROWNUM. This doesn't seem to adjust the record set at all, but gives it the variable information of rownum. In Pascal's version the WHERE end_num is done here. - The outter-most query does the paging part and in Pacal's it finishes the WHERE with the begin_num part. I guess I really don't understand enough of this query to reproduce or use as programming knowledge in the future. I don't see why this alphabetizes it better since both do the ordering at the same level. I don't see how adding the middle query adjusts things. It'd be nice to get this a little better and not have to ask so many questions in the future. and oh, thanks alot for the assistance. ~| 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:192081 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: Oracle Date Field
TO_DATE is to add it (you also use it with the cfqueryparam and the cf_sql_type for datetime) TO_CHAR is to retrieve it in the format you want. -Original Message- From: ColdFusion Developer [mailto:[EMAIL PROTECTED] Sent: 25 January 2005 11:48 To: CF-Talk Subject: Oracle Date Field Using a CF Query to add a record to Oracle, I havea date field to add When adding it, it is straightforward, right? When retrieving the date information, I need to do a To_Date function? Is that correct? Been a long time since I had to use Oracle. ~| 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:191669 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: Dynamic variable name (WAS: XML Variable Issue)
You could do cfset config.siteConfig.siteSections[url.SectionName].XMLText = True -Original Message- From: James Smith [mailto:[EMAIL PROTECTED] Sent: 18 January 2005 10:59 To: CF-Talk Subject: RE: Dynamic variable name (WAS: XML Variable Issue) OK, well while on the subject of doing things the correct way, how would you set this value? cfset config.siteConfig.siteSections.#url.SectionName#.XMLText = True works, but is there a better/cleaner way? Yey, cfif IsDefined(Config.SiteConfig.SiteSections.#Sections.Name#) works fine! cfif structKeyExists(config.siteConfig.siteSections,sections.name) Faster, safer. Do a Google search for isDefined and CGI scope to see why structKeyExists is better. ~| 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:190889 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: QofQ data type assignation
AFAIK this is correct. There have been many discussions on this topic (and some possible workarounds) in this list Pascal -Original Message- From: Paul Vernon [mailto:[EMAIL PROTECTED] Sent: 19 January 2005 08:36 To: CF-Talk Subject: QofQ data type assignation Can someone verify how the QofQ functions assign datatypes to the columns of a query passed into it on CFMX 6.1?? My suspicion is that it typecasts the whole dataset based on a test case of the first row of data in the query you are querying... If someone can verify this or correct my assumption then I'd be most grateful. Paul ~| Logware: 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:191043 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: Regular Expression (searching from the end)
No, it returns pos and length of the subgroups, but you can use that with greedy matches to find the position: position = 0; stTmp = REFind(^.*(a),string,1,true); if(stTmp.pos[1]) position = stTmp.pos[2]; This gives the last position of a. OR you can do what you suggested yourself in your previous post. Reverse the string and look for the first occurrence. -Original Message- From: Adam Haskell [mailto:[EMAIL PROTECTED] Sent: 12 January 2005 13:16 To: CF-Talk Subject: Re: Regular Expression (searching from the end) Alernatively you can use refind and return the array thing I beleive it returns the POS and Len of all the times it found then you could just look at the last element in the array, TIMTOWTDI. Adam H On Wed, 12 Jan 2005 11:39:24 +, Andrew Dixon [EMAIL PROTECTED] wrote: Hi Everyone. I need to find the last occurance of a character in a string. Is there a way I can use a regular expression to search the string from the end backwards for the character? Or is there another way I can do it using a CF function. At the moment I have a conditional loop that uses the Find() function to search until it returns 0 and then report the previous value as the last occurance. This works fine, but I feel there should be a better way. Thanks Andrew. ~| 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:190072 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: Regex Help.
^\d*(\.\d{1,2})?$ This should do it if you allow an empty string to be validated as a number. If you don't allow empty strings, just test that the length is greater than zero. This would be easier than writing the regexp to test for that too. Pascal -Original Message- From: DURETTE, STEVEN J (AIT) [mailto:[EMAIL PROTECTED] Sent: 10 January 2005 20:43 To: CF-Talk Subject: Regex Help. Hi All, Need some help with a regex. What I'm trying to do is validate and input in javascript. The users are allowed to input a number. It can be in the following formats: 9 9.9 9.99 .99 .9 (9 used inplace of any digit.) I tried using \b[0-9.]+ and I've tried \b[\d]*([.]?[\d]{0,2})? and I've tried ([\d]*([.][\d]{1,2})?){1} but I can't seem to get the response that I want. The user can still input numbers such as 1.25.25 and it will pass the regex test. To be more specific in what I'm looking for, the users are putting in hours and partial hours. There can be any amount of hours, but partial hours are limited to .0, .00,.25, .5, .50, .75 or no decimal part whatsoever. (I've been trying to do the .25, .5, etc in another part of the javascript, but if I can do it in the regex even better.) Anybody got any ideas. Thanks Steve ~| Protect your mail server with built in anti-virus protection. It's not only good for you, it's good for everybody. http://www.houseoffusion.com/banners/view.cfm?bannerid=39 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189886 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: Firefox Tabs
This isn't entirely correct. If a link has target=_blank and I click on it, it will open in a new tab (because I set it up that way) Pascal -Original Message- From: James Smith [mailto:[EMAIL PROTECTED] Sent: 04 January 2005 17:03 To: CF-Talk Subject: RE: Firefox Tabs A user can always open a link in a new window with the application of a right click, just like a firefox user can open a new tab with the right mouse button. However I have the ability to set target=_blank on a link and the link will open in a new window, transferring control to me. ~| 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:189255 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: Extract year from date field
In cf?? Year(date) Pascal -Original Message- From: Robert Orlini [mailto:[EMAIL PROTECTED] Sent: 31 December 2004 16:57 To: CF-Talk Subject: RE: Extract year from date field Thanks Jochem. How would I extract the year from 2005-10-12 please? -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Friday, December 31, 2004 10:47 AM To: CF-Talk Subject: Re: Extract year from date field Robert Orlini wrote: How do I extract the year from a date field such as 2005-10-12? I'm using datepart in the Query as: datepart(yy,report_date), but when I try to output it as: cfoutput query=populatedropdown #datepart(, populatedropdown.report_date)# /cfoutput it gives an form field not found error. Here is the query: cfquery name=populatedropdown datasource=test select distinct(datepart(m,report_date)) as month from report where datepart(yy,report_date) = '2005' /cfquery This query only returns months, so how can you extract a year from that? Jochem ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189065 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: Table join issue
Use GROUP BY and grouped output. The code may need some tweaking as your previous posts didn't have all the info (or contradicting info). cfquery datasource=#request.dsn# name=qLeave SELECT e.FirstName, e.LastName, e.Email, e.EmployeeID, s.Leavetype, COUNT(*) AS totalDays FROM employee e LEFT OUTER JOIN SASCalendar s ON e.EmployeeID = s.EmployeeID WHERE s.ApproverID = cfqueryparam cfsqltype=cf_sql_integer value=10005 AND s.YearMonth like cfqueryparam cfsqltype=cf_sql_varchar value=2004%12 GROUP BY e.FirstName, e.LastName, e.Email, e.EmployeeID, s.Leavetype ORDER BY e.EmployeeID, s.Leavetype /cfquery cfoutput query=qLeave group=EmployeeID #qLeave.LastName# #qLeave.FirstName#, #qLeave.Email# : cfoutput #qLeave.Leavetype# (#qLeave.totalDays#) /cfoutput br /cfoutput Pascal -Original Message- From: Ken [mailto:[EMAIL PROTECTED] Sent: 26 December 2004 04:46 To: CF-Talk Subject: Re: Table join issue That's right. But employee name etc is in employee table and the leave data is stored in a seperate table. Each day of leave in that table is one record. So i need recordcount for each leavetype for that employee. Hope that answers your question. Any clues? ~| 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:188795 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: DateAdd problems.
UKTodayDate is not a function, but a variable: nextEdition = lcase(DateFormat(DateAdd(m, 1, UKTodayDate),)) -Original Message- From: Stuart Kidd [mailto:[EMAIL PROTECTED] Sent: 23 December 2004 13:39 To: CF-Talk Subject: DateAdd problems. Hi, I'm having an annoying problem with DateAdd. I'm hosted in the States and I'm in the UK so to fix that in my Applicatin.cfm I've put: cfset UKtodayDate = #DateAdd(h, 5, Now())# That is fine and i've used it forever. To find the current edition (month) of my magazine I use: cfset thisEdition = lcase(MonthAsString(month(UKtodayDate))) I want to have an image on my page which displays the next month's advert and I'm trying to get the next month's name. I've tried: cfset nextEdition = #DateAdd(m, 1, lcase(MonthAsString(month(UKtodayDate()# This doesn't seem to work so I have broken it down into two lines which is: cfset nextEditionA = #DateAdd(m, 1, Now())# cfset nextEdition = lcase(MonthAsString(month(nextEditiona))) This works BUT only when i use 'Now', but i'd really like to use 'UKtodayDate' (otherwise it's five hours behind) but for some bizarre reason it doesn't work. Is it because when i do my initial DateAdd (cfset UKtodayDate = #DateAdd(h, 5, Now())#) i'm doing it incorrectly? Is there a way I can get all of this on 1 line instead of two? Thanks for your help, Saturday ~| 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:188621 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: DateAdd problems.
DateAdd takes a date as 3rd argument, not the name of the month Pascal cfset nextEdition = DateAdd(m, 1, lcase(MonthAsString(month(UKtodayDate ~| 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:188628 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: CF tags work inside of CSS
Yes, just give your css file a cfm extension and use cfcontent to have the correct mime-type (although it will work without) Pascal -Original Message- From: Stuart Kidd [mailto:[EMAIL PROTECTED] Sent: 23 December 2004 16:16 To: CF-Talk Subject: CF tags work inside of CSS Hi, I have a colour theme which changes each month. Instead of having 12 different stylesheets to cover for the year i wanted to have some CF code at top of my CSS page, something like: cfswitch expression=#thisMonth# cfcase value=january cfset myColour = #08BF83 /cfcase cfcase value=february cfset myColour = #085F83 /cfcase cfcase value=march cfset myColour = #08B383 /cfcase /cfswitch So when I get down to the part in the stylesheet which says: a.preferences:hover { color: #FF; background-color: #8DC63F; padding-top: 0px; padding-right: 6px; padding-bottom: 0px; padding-left: 6px; border: 1px solid cfoutput#myColour#/cfoutput; margin: 5px 4px; text-decoration: none; font-size: 10px; } I've never tried this, do CF tags work in CSS? Thanks for you time, Saturday ps: for those North Americans... cfset myColour = myColor ;) (it's actually looks weird seeing it written as 'colour' nowadays). ~| 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:188651 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: regex question
It all depends what you want to do with the XXX. If you want to use it as is, you can use backreferencing: REReplaceNoCase(CONTENT,FOO:(.*?),'a href=lookup.cfm?word=\1\1/a',ALL) Where \1 will match XXX. If you need to transform it, you will need a loop: cfscript start = 1; while(true){ stTmp = REFindNoCase(FOO:(.*?),content,start,true); if(stTmp.pos[1] IS 0) break; value = Mid(content,stTmp.pos[2],stTmp.len[2]); content = RemoveChars(content,stTmp.pos[1],stTmp.len[1]); newvalue = getSnippet(value); content = Insert(newvalue,content,stTmp.pos[1] - 1); start = stTmp.pos[1] + Len(newvalue); } /cfscript I just wrote this code without testing, so it may need some tweaking. Pascal -Original Message- From: Rick Root [mailto:[EMAIL PROTECTED] Sent: 22 December 2004 13:52 To: CF-Talk Subject: regex question (I posted this once, and it didn't bounce but I didn't see it come through to the list...) Question about regex (this never happens here, does it!) I want to match FOO:XXX where XXX could be any length of characters (but most likely a uuid) And I want to know the matched string when I'm done... Ie, some variable set to XXX, whatever XXX is. How do it do that? Ultimately, I'd like to pass the matched result to a function and do a replace... ie, something like this: REReplaceNoCase(CONTENT,FOO:.*?,getSnippet(XXX),ALL) - rIck ~| 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:188522 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: Okay, stupid question time...
cfset qNews = myObject.getNews() cfoutput query=qNews... -Original Message- From: Jeff Small [mailto:[EMAIL PROTECTED] Sent: 22 December 2004 17:18 To: CF-Talk Subject: Okay, stupid question time... cfobject name=myObject component=mySite.myCFC cfoutputmyObject.getNews().headline/cfoutput Naturally...only one displays, even though the query returns three...totally cool so far... Now, I want to loop over the Query object that getNews() returns... so...um cfoutput query=**Here's Where My Brain Shuts Off**myObject.getNews().headline/cfoutput ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188546 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
I don' think you can get those who passed and failed in the same query using QofQ. Getting those who failed is easy: cfquery name=qOverall dbtype=query SELECT DISTINCt userid FROM q WHERE pass = 'fail' /cfquery Then you can use your first query and CF to display passed and failed: PaAscal -Original Message- From: Andy Jarrett [mailto:[EMAIL PROTECTED] Sent: 20 December 2004 12:51 To: CF-Talk Subject: OT: SQL Hi there, I am have a table with user id and grade SQL statement. THe Table is - userid | grade 1 | pass 1 | pass 1 | pass 2 | fail 2 | pass 3 | pass 4 | pass 4 | fail 5 | pass The output shows bascially whether the user has passed all courses. So user 1 would be an overall 'Pass' mark as all courses are completed. Yet user 2 would be an overall 'Fail' as he/she has one more course to pass. Oh and this is a QoQ that i have to do this in. Any help appreciated Regards Andy J www.andyjarrett.co.uk ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188227 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: updating my date_added from a form fails
Or even better, use cfqueryparam -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: 20 December 2004 15:09 To: CF-Talk Subject: Re: updating my date_added from a form fails try wrapping Form.date_added in a createODBCDateTime() function (or just a createODBCDate() if you don't need time). On Mon, 20 Dec 2004 09:03:27 -0500, Daniel Kessler [EMAIL PROTECTED] wrote: I have an Oracle database with a record where when I update it with now() it works. From that point on, for editing, I carry the date_added through a hidden form field which has the source of INPUT TYPE='Hidden' NAME='date_added' VALUE='2004-12-20 08:50:51.0' When I try and use that hidden form field with the date to update the record, I get the following error: ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188249 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: PreserveSingleQuotes error, I think
It treats the value as a comma separated list. You use that with column IN() Pascal -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED] Sent: 18 December 2004 14:25 To: CF-Talk Subject: RE: PreserveSingleQuotes error, I think Thanks Jochem... I really wondered whether or not if I need that function The reference below to list=yes... what exactly does that do? cfqueryparam cfsqltype=cf_sql_integer value=#product_id# list=yes -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED] Sent: Saturday, December 18, 2004 8:04 AM To: CF-Talk Subject: Re: PreserveSingleQuotes error, I think Tim Laureska wrote: ERROR: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression. SQL = INSERT INTO mailing_list (product_id, state_id) SELECT p.product_id, s.state_id FROM products p, states s WHERE p.product_id IN ('1') AND s.state_id IN ('3') PROCESSNG TEMPLATE CODE: CFSET Product_id_QVL = ' replace(replace(product_id,','',ALL),,,',',ALL) ' CFSET state_id_QVL = ' replace(replace(state_id,','',ALL),,,',',ALL) ' CFQUERY Name=InsNewXref DataSource=pap_search INSERT INTO mailing_list (product_id, state_id) SELECT p.product_id, s.state_id FROM products p, states s WHERE p.product_id IN (#PreserveSingleQuotes(product_id_QVL)#) AND s.state_id IN (#PreserveSingleQuotes(state_id_QVL)#) /CFQUERY Your error is the use of single quotes, integers don't need them. But there is a better way then just fixing that: cfqueryparam with the list attribute: cfquery dataSource=pap_search INSERT INTO mailing_list (product_id, state_id) SELECT p.product_id, s.state_id FROM products p, states s WHERE p.product_id IN (cfqueryparam cfsqltype=cf_sql_integer value=#product_id# list=yes) AND s.state_id IN (cfqueryparam cfsqltype=cf_sql_integer value=#state_id# list=yes) /cfquery Jochem ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188138 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: record count
It is not making a request to the db. As an alternative you could do count = ListLen(ValueList(qMyQuery.myfield,chr(7)),chr(7)) I don't know if it would be faster than QofQ, and it will only work tou count non empty fields in one column. Pascal -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED] Sent: 17 December 2004 19:05 To: CF-Talk Subject: RE: record count Thanks Anthony... but where is that any different from just doing another query such as ... ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188032 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: QUERY2FORM
You can't right now. You could add a third (optional) argument, that is a list of fields NOT to include. Then on the second call, pass the columnlist of the first query to that. cffunction name=Query2Form returntype=string output=false cfargument name=query required=yes type=query cfargument name=exclude required=no default= type=string cfargument name=extension required=no default=_asim type=string cfset var i = cfset var out = cfif query.recordCount cfloop list=#query.columnList# index=i cfif NOT ListFindNoCase(exclude,i) cfset out = out 'input type=hidden name=#i##extension# value=#HTMLEditFormat(query[i][1])#' /cfif /cfloop /cfif cfreturn out /cffunction Pascal -Original Message- From: Asim Manzur [mailto:[EMAIL PROTECTED] Sent: 15 December 2004 20:53 To: CF-Talk Subject: Re: QUERY2FORM The last thing which needs to be done is I have two different table which has same field names. when I am using the function Query2Form, and these two variables comes to the loop it becomes a comma delimated value. How can I prevent to re-declare the already declared variable in Query2Form funciton ? ? ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187858 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: QUERY2FORM
This is due to CF automatic server side validation. You can't have any form fields that end in _date, _eurodate, _required, _integer, _float, _time, _range (check the docs to see if the list is complete) Looking at your error, I suspect you have billing_date as a form field. This will give you problems with your automated cfquery2form. As a workaround, you could add a custom extension (like _asim at the end of the form vars and strip it of in the action page: cffunction name=Query2Form returntype=string output=false cfargument name=query required=yes cfargument name=extension required=no default=_asim cfset var i = cfset var out = cfif query.recordCount cfloop list=#query.columnList# index=i cfset out = out 'input type=hidden name=#i##extension# value=#HTMLEditFormat(query[i][1])#' /cfloop /cfif cfreturn out /cffunction cffunction name=CleanForm returntype=struct output=false cfargument name=stForm required=yes cfargument name=extension required=no default=_asim cfset var stTmp = StructNew() cfset var key = cfloop collection=#stForm# item=key cfset stTmp[REReplaceNoCase(key,#ext#$,)] = stForm[key] /cfloop cfset stForm = stTmp cfreturn true /cffunction Pascal PS I wrote the code in the mail and didn't test it at all. -Original Message- From: Asim Manzur [mailto:[EMAIL PROTECTED] Sent: 14 December 2004 16:49 To: CF-Talk Subject: Re: QUERY2FORM Thanks I tried that but got the error. Somehow its trying to do the server side validation. Howto prevent that Form entries incomplete or invalid. Dry Van Yes The value entered for the BILLED field ('0') is not correctly formatted. Please go back and correct the problem. ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187584 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: number of logins
Then it looks like you are storing numerical data in a text field. What is login in your table and in your form??? What do you use it for?? Did you enable debugging to see the actual query? Oh, and about what you are doing wrong: you are not using cfqueryparam ;) Pascal -Original Message- From: Robert Orlini [mailto:[EMAIL PROTECTED] Sent: 14 December 2004 19:07 To: CF-Talk Subject: RE: number of logins I get an Data type mismatch in criteria expression. error when I do that though... -Original Message- From: Adkins, Randy [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 14, 2004 12:16 PM To: CF-Talk Subject: RE: number of logins Is form.login a NUMERIC? If so, should it be: And LOGIN #FORM.LOGIN# Drop the single quotes -Original Message- From: Robert Orlini [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 14, 2004 12:06 PM To: CF-Talk Subject: number of logins The query below does not search the form.login value correctly. I tried either isdefined or just checking with a NEQ to , but it does not display logins greater than a value I submit. I checked the logic on the bottom of the page (see below) and it seems correct. I even added a trim, but still it does not give me the desired results on the number of logins. Its in an Access table What am I coding wrong here? Thanks. Robert O. HWW cfquery name=Getcustomer datasource=test Select * from test Where 0 = 0 CFIF IsDefined(FORM.customer) And customer LIKE '#FORM.customer#%' /CFIF cfif Form.login NEQ And login '#FORM.login#' /cfif !--- cfif IsDefined(Form.login) And login '#trim(FORM.login)#' /cfif --- ~| 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:187595 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: QUERY2FORM
If you are still interested, I tested and debugged it: cffunction name=CleanForm returntype=boolean output=false cfargument name=stForm required=yes type=struct cfargument name=extension required=no default=_asim type=string cfset var key = cfset var newkey = cfset var value = cfset var fieldnames = cfif Len(extension) AND NOT StructIsEmpty(stForm) cfloop list=#StructKeyList(stForm)# index=key cfif key NEQ fieldnames cfset newkey = REReplaceNoCase(key,#extension#$,) cfif newkey neq key cfset value = stForm[key] cfset StructDelete(stForm,key) cfset stForm[newkey] = value /cfif cfset fieldnames = ListAppend(fieldnames,newkey) /cfif /cfloop cfset stForm.fieldnames = ListSort(fieldnames,textnocase) /cfif cfreturn true /cffunction Pascal -Original Message- From: Asim Manzur [mailto:[EMAIL PROTECTED] Sent: 14 December 2004 18:29 To: CF-Talk Subject: Re: QUERY2FORM Hi that was the problem the table field was named bill_date and your function works fine only had the problem with cleanForm but I have changed the field name in the table ~| 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:187603 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: Error handling on db queries
Use try/catch. There is a variable in the cfcatch struct that tells you the error code. If the error code is the one for Lost connection to MySQL server during query, do a cflocation. Pascal -Original Message- From: Evan Schott [mailto:[EMAIL PROTECTED] Sent: 15 December 2004 00:00 To: CF-Talk Subject: Error handling on db queries I get frequent database errors with the message Lost connection to MySQL server during query. A simple page refresh will resubmit the query and the page loads properly. Does anyone have any tips on how to handle this type of error so it retries the query before sending the user to an error page? Thanks! ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187677 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: Oddball query that sometimes works, sometimes doesn't
Heel leuk (LOL) -Original Message- From: Micha Schopman [mailto:[EMAIL PROTECTED] Sent: 14 December 2004 09:29 To: CF-Talk Subject: RE: Oddball query that sometimes works, sometimes doesn't Error Occurred While Processing Request Error Diagnostic Information ColdFusion cannot determine how to process the tag CFQUERYPARAAM. The tag name may be misspelled. The error occurred while processing an element with a general identifier of (CFQUERYPARAAM), occupying document position (50:1) to (50:17). Hmm ... bummer ;) ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187517 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: reReplace()
If you want to delete cr/lf: REReplace(str,\r?\n,,all) This is CFMX only (this should take care of cr/lf on windows AND lf on *nix). I never used a Mac, but if I understood correctly, \n will take care of cr on a Mac. For CF5, use #chr(13)#?#chr(10)# (this won't take care of mac, although I might be wrong) Pascal -Original Message- From: Tony Weeg [mailto:[EMAIL PROTECTED] Sent: 13 December 2004 22:31 To: CF-Talk Subject: Re: reReplace() i know how to use the reReplace to replace characters and stuff, but what about removing special things, like cr + lf, can you do that in regex? ben :) anyone... thanks. tony On Mon, 13 Dec 2004 16:22:45 -0500, Tony Weeg [EMAIL PROTECTED] wrote: hi there. i need to remove all carriage returns and white space from the contents of a cfsavecontent. one problem. however, there are some *good* #Chr(13)##Chr(10)# that i want to keep. so, what i was thinking, is to put something like #Chr(0)# at each *good* spot then after i replace all cf+lf and white space, ill drop #Chr(13)##Chr(10)# where i find all #chr(0)#'s although this doesnt seem to be too non-kludgy... so, any idea how i can remove all crappy whitespace and cr+lf from a cfsavecontent's value? all of this will end up in a csv file, which explains why i need all the crap removed.. thanks! -- tony Tony Weeg macromedia certified coldfusion mx developer email: tonyweeg [at] gmail [dot] com blog: http://www.revolutionwebdesign.com/blog/ cool tool: http://www.antiwrap.com -- tony Tony Weeg macromedia certified coldfusion mx developer email: tonyweeg [at] gmail [dot] com blog: http://www.revolutionwebdesign.com/blog/ cool tool: http://www.antiwrap.com ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187516 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: Oddball query that sometimes works, sometimes doesn't
You have a comma in one of your prices!! Well, most people on this list know what I will say now: CFQUERYPARAAM -Original Message- From: Karl [mailto:[EMAIL PROTECTED] Sent: 14 December 2004 05:52 To: CF-Talk Subject: Oddball query that sometimes works, sometimes doesn't I have one oddball query that sometimes works and sometimes doesn't, but I can't figure out why it only fails sometimes and not all the time. I've got it set up in the application with a CFTRY so that when it fails CFCATCH sends me the query in an email, then I can cut and paste it into a SQL Server query window and it will work every time. I thought I might be using a Reserved Word accidentally, but even DateTimeStamp is not on the Reserved Words list on Books Online. I'm using CF MX 6.1 and SQL Server 2000. Here is the query, the error messages generated, and the structure of the table it populates: INSERT INTO BounceBackGiftCertLog ( OrderNo, EntityID, Email, CustID, QualifiedOrderAmt, GiftCertThreshold, DateTimeStamp, FraudYN, ActiveYN ) VALUES ( 1077637, 2582, '[EMAIL PROTECTED]', !--- I only modified this one line for privacy --- '339341312140021115571479520041213143933222', $3,177.21, $120.00, '12/13/2004 07:02:46 PM', 0, 1 ) ERROR REPORTED BY COLDFUSION: cfcatch.message = Error Executing Database Query. Detail: [Macromedia][SQLServer JDBC Driver][SQLServer]There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement. (Except that the damn query works just fine if I cut and paste it into SQL Server, so this has got to be a bogus message). Here is the table structure: /** Object: Table [dbo].[BounceBackGiftCertLog]Script Date: 12/13/04 8:41:47 PM **/ CREATE TABLE [dbo].[BounceBackGiftCertLog] ( [ID] [int] IDENTITY (1, 1) NOT NULL , [OrderNo] [int] NULL , [EntityID] [int] NULL , [Email] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [CustID] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [QualifiedOrderAmt] [money] NULL , [GiftCertThreshold] [money] NULL , [DateTimeStamp] [datetime] NULL , [FraudYN] [bit] NULL , [ActiveYN] [bit] NULL ) ON [PRIMARY] GO ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187514 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: Another 404 question
CGI.HTTP_HOST ? Pascal -Original Message- From: Seamus Campbell [mailto:[EMAIL PROTECTED] Sent: 11 December 2004 12:01 To: CF-Talk Subject: Another 404 question I'm on a shared host ie several domains for different clients under a single root directory. I can set up my own custom 404 page but only one for all my sites. All sites have their own folder so I'm trying to use cfswitch to give each directory(domain) it's own error page. Ie a single error cfm page with a cfswitch for each domain. I thought I could use CGI.HTTP_REFERER but that doesn't work. Anyone have any clues as to how I could do this Many thanks Seamus Seamus Campbell Boldacious WebDesign http://www.boldacious.com [EMAIL PROTECTED] ph 02 6297 4883 mob 0410 609 267 ~| 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:187185 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: help with some form validation
Missing $ ^\d{3}-\d{4}$ Pascal -Original Message- From: Umer Farooq [mailto:[EMAIL PROTECTED] Sent: 10 December 2004 05:55 To: CF-Talk Subject: Re: help with some form validation ^([0-9]{3})-([0-9]{4}) dave wrote: i need a field to be like 123-1234 only anyone got anything good off hand? tia ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186951 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: odd.. cfoutput group and cfloop over query
This has always been like this (and must have been discussed a 100x on this list). When you have nested loops over queries (it doesn't matter if you are using cfoutput or cfloop), coldfusion looses the reference to the first query when looping the second. This means that you can't drop the prefix (which you shouldn't in the first place) and that q1.currentRow will always return 1 (and q1.column will always return the value from the first record. You have already found the solution for that problem: set the value to a variable before the second loop. If you have a lot of fields from the first query to access in the second loop, just save the currentRow in a variable and use array notation for the first query. cfloop query=q1 cfset i = q1.currentRow cfloop query=q2 cfif q2.c1 IS q1.c1[i] do something /cfif /cfloop /cfloop Pascal -Original Message- From: Umer Farooq [mailto:[EMAIL PROTECTED] Sent: 10 December 2004 02:54 To: CF-Talk Subject: odd.. cfoutput group and cfloop over query Hi, I'm getting this odd.. problem.. when doing.. cfouput query=QUERYONE group=SOMECOLUMN cfloop query=QUERYTWO cfif QUERYONE.XID eq QUERYTWO.YID SOMETHING /cfif /cfloop /cfoutput in the loop QUERYONE.XID will keep the first row value. if I remove the prefix from XID.. it gives me an error saying its not defined. Which is odd by itself. I can get away from the error by setting a variable.. before the loop and then compare on it.. Any thoughts on this.. ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186952 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: cfinclude not working in firefox
cfinclude is server side and has nothing to do with the browser you use! Pascal -Original Message- From: Tim Laureska [mailto:[EMAIL PROTECTED] Sent: 10 December 2004 16:54 To: CF-Talk Subject: cfinclude not working in firefox Has anyone run upon this? Tim ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187001 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: Cannot Update Date/Time field
Use cfqueryparam and set the null attribute dynamically Pascal -Original Message- From: Richard Colman [mailto:[EMAIL PROTECTED] Sent: 10 December 2004 18:45 To: CF-Talk Subject: Cannot Update Date/Time field I cannot update a date/time field within ACCESS when the value of the field is null. The field is marked not required in ACCESS so it should accept nulls. I get a datatype mismatch. Does anyone have a solution for this problem?? Richard Colman ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187050 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: String question...
if(Find(AUDIT/,string) IS 1) if(REFind(^AUDIT/,string)) Use the NoCase version if you don't need it to be case sensitive Pascal -Original Message- From: Charles Heizer [mailto:[EMAIL PROTECTED] Sent: 08 December 2004 18:37 To: CF-Talk Subject: String question... Hello, I was wondering if someone has a way or something to determine if a string starts with or begins with. I can do contains but what I'm looking for is if I have a string like AUDIT/Systems I want to know if the string begins with AUDIT/. Thanks, - Charles ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186753 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: One More List Question:
The code worked just fine for me. If you are having extra blanks, there is something wrong with the data or with some other line of code. To cover all bases, you can write a simple udf to create the list: function addToList(list,value){ value = trim(value); if(NOT Len(value)) value = -; return ListAppend(list,value,|); } ... emailList = addToList(emailList,fromArray); If you are not passing this list to HTML, I would use a structure to store the info instead of a list. This way all your problems are gone and your code becomes much more readable! Pascal -Original Message- From: Les Mizzell [mailto:[EMAIL PROTECTED] Sent: 07 December 2004 20:29 To: CF-Talk Subject: Re: One More List Question: cfset emailList = ListAppend(emailList,REReplace(fromArray,^$,- ),|) I've tried about every combination of REReplace I can thing of, including [[:blank:]], but the below will toss an error every single time. Steve || [EMAIL PROTECTED] Note multiple things wrong with this... a. space before Steve b. 2nd element is blank/missing c. space before email address. Trying to cover all stupid client tricks I can come up with... I've got trim statements applied before this stuff gets written to the database, plus I'm validating the email addresses, but just trying to get it divided up like the below when there's an empty position is giving me fits... cfset firstname = ListGetAt(emailLIST,1,|) cfset lastname = ListGetAt(emailLIST,2,|) cfset email = ListGetAt(emailLIST,3,|) -- Les Mizzell ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186612 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: form action=???????
You are missing a cfoutput around the form Pascal -Original Message- From: Brant Winter [mailto:[EMAIL PROTECTED] Sent: 08 December 2004 12:28 To: CF-Talk Subject: form action=??? hi - just wondering what people prefer to use in their login code in the Application.cfm file and its associated form template. The Developing Coldfusion MX Applications book , pp.363, states that the form action should be: form action=#CGI.script_name#?#CGI.query_string# method=post It does seem to work because when I try to access a page say something.cfm that i ssecured with the cflogin stuff in the Application.cfm file, it will actually post me back to that something.cfm page when the login is finished, but i get the followig appended to the URL string: /test1/something.cfm#CGI.script_name#?#CGI.query_string# Any thoughts or suggestions ~| 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:186619 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: CFFM almost finished
You can do it with a single regexp if you want: (^|[/\\])\s*\.+\s*($|[/\\]) I am assuming that for the last one, you actually wanted \.+$. If you really wanted \.+, you can just drop the first three. I also added \s* to make sure there wasn't a dot and a space, because I didn't know how you treated it later. Pascal -Original Message- From: Rick Root [mailto:[EMAIL PROTECTED] Sent: 08 December 2004 14:04 To: CF-Talk Subject: Re: CFFM almost finished Martin Parry wrote: Hey dude - modified the banner page for you.. Heh, thanks Martin! There was a bug in my regular expression code that checked for such a security breach. Here is my new regex... cfif ReFind(^\.+[\\\/],checkValue) gt 0 OR ReFind([\\\/]\.+$,checkValue) gt 0 OR ReFind([\\\/]\.+[\\\/],checkValue) gt 0 OR ReFind(\.+,checkValue) gt 0 cfreturn arguments.defaultValue cfelse cfreturn arguments.checkValue /cfif It's intended to block the following: ../(something) ./(something) (something)/.. (something)/. (something)/../(something) (something)/./(something) . .. ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186624 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: Set Session Variable help needed
Can not be done without submitting the form (remember session vars are server side and can't be accessed from the browser). However, you can submit the form without a button. Just add onClick=this.form.submit() in your radio buttons. Change the name of the radio to siteType. Submit to an action page and in that page you do session.siteType = form.siteType. If you want to do it without reloading the page you are on, you can submit to a hidden frame. Check out JSAPI by Pengoworks ( http://www.pengoworks.com/workshop/js/gateway/ ) Pascal -Original Message- From: Charles Heizer [mailto:[EMAIL PROTECTED] Sent: 06 December 2004 22:58 To: CF-Talk Subject: Set Session Variable help needed Hello, This is not something I've done before so I thought I would ask first. I'm looking for a way to set a session variable with a simple cfform tag and no submit button. cfform name=setSiteType Site Type: Flash input name=session.siteType type=radio value=Flash checked Htmlinput name=session.siteType type=radio value=Html /cfform Thanks, - Charles ~| 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:186423 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 LIKE question
Are you sure searchString contains 0059 and not 59 ?? How is it defined? Pascal -Original Message- From: Scott Mulholland [mailto:[EMAIL PROTECTED] Sent: 07 December 2004 00:11 To: CF-Talk Subject: sql LIKE question Is there any way to force LIKE to match on leading zeros? If I have a query along the lines of: select accountkey from companies where accountno LIKE '%#searchString#%' and I search with a string of: 0059 I am getting results like: 05976574 12343459 59748311 It treats it as if I entered 59 in the search string. Thanks, Scott --- [This E-mail scanned for viruses by Declude Virus] ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186438 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: One More List Question:
http://www.cflib.org/udf.cfm?ID=507 Pascal -Original Message- From: Les Mizzell [mailto:[EMAIL PROTECTED] Sent: 07 December 2004 18:01 To: CF-Talk Subject: One More List Question: Given the below: cfset firstname = ListGetAt(emailLIST,1,|) cfset lastname = ListGetAt(emailLIST,2,|) cfset email = ListGetAt(emailLIST,3,|) ...and the list it's reading from looks like, with a blank second element: Steve || [EMAIL PROTECTED] How do I *force* a value for lastname - even if it's just a placeholder like - or something... Thanks, -- Les Mizzell ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186481 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-javascript
Debug JS with firefox. You will (probably) get more accurate info on the error Pascal -Original Message- From: Eric Creese [mailto:[EMAIL PROTECTED] Sent: 07 December 2004 18:07 To: CF-Talk Subject: RE: OT-javascript says line 1 -Original Message- From: Thomas Chiverton [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 10:59 AM To: CF-Talk Subject: Re: OT-javascript On Tuesday 07 Dec 2004 16:45 pm, Eric Creese wrote: Trying to run a simple print window java script but it fails here On which line ? ~| 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:186483 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-javascript
Install it. The developer toolbar alone is worth it. Pascal -Original Message- From: Eric Creese [mailto:[EMAIL PROTECTED] Sent: 07 December 2004 18:34 To: CF-Talk Subject: RE: OT-javascript do not have firefox -Original Message- From: Pascal Peters [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 11:15 AM To: CF-Talk Subject: RE: OT-javascript Debug JS with firefox. You will (probably) get more accurate info on the error Pascal ~| 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:186495 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: One More List Question:
It's meant to be applied on the finished list. If you create the list yourself, just replace empty values by something cfset emailList = ListAppend(emailList,REReplace(fromArray,^$,-),|) Pascal -Original Message- From: Les Mizzell [mailto:[EMAIL PROTECTED] Sent: 07 December 2004 18:41 To: CF-Talk Subject: Re: One More List Question: http://www.cflib.org/udf.cfm?ID=507 This looks like a start in the right direction. How would I apply it during the append process? cfset emailLIST = ListAPPEND(emailLIST, fromARRAY, |) ~| 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:186503 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: RegEx (again!)
This is something you can't do (easily) with regexp. The text means anything except the characters / s p a n . Remember that that [] matches a SINGLE character. If you want to remove empty span tags, do it in 4 steps: 1. find empty span tag (no regexp needed) 2. remove it 3. find matching end tag (note that span tags can be nested, so it is not necessarily the next /span) 4. remove it cfscript function RemoveSpan(text){ var start1 = 1; var start2 = 1; var pos = 0; var stTmp = StructNew(); var cnt = 0; while(true){ // find empty span pos = FindNoCase(span,text,start1); if(NOT pos) break; // remove empty span tag text = RemoveChars(text,pos,Len(span)); // find matching end tag cnt = 1; start2 = pos; start1 = pos; while(true){ stTmp = REFindNoCase(/?span[^]*,text,start2,true); if(NOT stTmp.pos[1]) break; start2 = stTmp.pos[1] + stTmp.len[1]; if(Mid(text,stTmp.pos[1]+1,1) IS /) cnt = cnt - 1; else cnt = cnt + 1; if(cnt IS 0){ // remove matching end tag text = RemoveChars(text,stTmp.pos[1],stTmp.len[1]); break; } } } return text; } /cfscript Pascal -Original Message- From: Duane Boudreau [mailto:[EMAIL PROTECTED] Sent: 03 December 2004 01:58 To: CF-Talk Subject: RegEx (again!) I thought I was finally catching on to this regex stuff but I guess not. I am using a tag from the developer exchange that strips a bunch of extra html that Word inserts into an HTML document. The text left over leaves a lot of extra spanxyx/span formatting. Since the opening span is empty I would like to remove them from the text. I tried this but no luck. textString = PSPANbDuane Boudreau/b/SPAN/PPSPAN[EMAIL PROTECTED]/SPAN/P; textString = reReplaceNoCase(textString, span([^/span]*)/span, \1, ALL); I thought that the text between the () meant all text except /span between the opening string span and the next /span What am I doing wrong here? Thanks, Duane ~| 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:186056 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: Creating a client variable timeout.
It all depends. How does your login work?? What do you use to identify someone as logged in? -Original Message- From: Stuart Kidd [mailto:[EMAIL PROTECTED] Sent: 03 December 2004 14:43 To: CF-Talk Subject: Creating a client variable timeout. Hi guys, I remember a long time ago i created a line of code which sat in my Application.cfm which checked to see whether a logged in user hadn't had any activity for 20 mins. Can anyone please remind me how to do this? Thanks, Saturday ~| 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:186065 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: Creating a client variable timeout.
I don't use much client vars, but this should work cfif DateDiff(n,client.LastVisit,Now()) GT 20 More than 20' inactivity /cfif Pascal -Original Message- From: Stuart Kidd [mailto:[EMAIL PROTECTED] Sent: 03 December 2004 14:59 To: CF-Talk Subject: RE: Creating a client variable timeout. When somebody logs in they are given a client.authorID which could be 25, 26 or any integer other than 0. By default in my Application.cfm i have a cfparam client.authorID = 0 and that's a guest user who doesn't have any login rights. My UK time is also set in my Application.cfm and i call it UKTodayDate (which is the US time where my server sits + 5). Saturday -- Original Message -- From: Pascal Peters [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Fri, 3 Dec 2004 14:49:16 +0100 It all depends. How does your login work?? What do you use to identify someone as logged in? -Original Message- From: Stuart Kidd [mailto:[EMAIL PROTECTED] Sent: 03 December 2004 14:43 To: CF-Talk Subject: Creating a client variable timeout. Hi guys, I remember a long time ago i created a line of code which sat in my Application.cfm which checked to see whether a logged in user hadn't had any activity for 20 mins. Can anyone please remind me how to do this? Thanks, Saturday ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186073 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: cffile read to read JUST the top line of the txt file.
No, but I think you can do it with java. -Original Message- From: Jeremy Bunton [mailto:[EMAIL PROTECTED] Sent: 03 December 2004 15:52 To: CF-Talk Subject: cffile read to read JUST the top line of the txt file. Hello, I want to use cffile to read just the top line (header line with field names) of a very large .csv file, say 5 million records. Is there a way to just read the top record into the variable in the cffile tag, with out having to read the whole file. Jeremy ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186078 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 cfml file manager - CFFM
window.foo (or parent.foo) (frames are not part of the document object) -Original Message- From: Rick Root [mailto:[EMAIL PROTECTED] Sent: 03 December 2004 16:08 To: CF-Talk Subject: Re: New cfml file manager - CFFM Andrew Grosset wrote: The image preview doesn't work in Mozilla Firebird 0.7 Okay, I'm stumped. Can someone help me? iframe name=foo ... In IE, I can do this: document.foo.location.href = ...; However, document.foo is undefined in Firefox. What's the proper way to target iframes with javascript in mozilla? - Rick ~| Special thanks to the CF Community Suite Silver Sponsor - RUWebby http://www.ruwebby.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186084 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: path variables, like expandpath ..
GetDirectoryFromPath(GetCurrentTemplatePath()) -Original Message- From: Mike [mailto:[EMAIL PROTECTED] Sent: 03 December 2004 16:17 To: CF-Talk Subject: path variables, like expandpath .. Is there a variable (maybe a cgi variable) that stores the root web path for the current template. For example.. http://www.domain.com/foo/blah.cfm I'm looking for a variable with this stored in it: http://www.domain.com/foo #CGI.SERVER_NAME##CGI.PATH_INFO# Gets me pretty close with the template name at the end.. -Mike ~| 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:186090 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: path variables, like expandpath ..
Sorry, misread your post. GetDirectoryFromPath(http://; CGI.HTTP_HOST CGI.SCRIPT_NAME) If you can have https, then use CGI.HTTPS to determine that. Pascal -Original Message- From: Pascal Peters [mailto:[EMAIL PROTECTED] Sent: 03 December 2004 17:26 To: CF-Talk Subject: RE: path variables, like expandpath .. GetDirectoryFromPath(GetCurrentTemplatePath()) -Original Message- From: Mike [mailto:[EMAIL PROTECTED] Sent: 03 December 2004 16:17 To: CF-Talk Subject: path variables, like expandpath .. Is there a variable (maybe a cgi variable) that stores the root web path for the current template. For example.. http://www.domain.com/foo/blah.cfm I'm looking for a variable with this stored in it: http://www.domain.com/foo #CGI.SERVER_NAME##CGI.PATH_INFO# Gets me pretty close with the template name at the end.. -Mike ~| Special thanks to the CF Community Suite Silver Sponsor - New Atlanta http://www.newatlanta.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186094 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: RegEx (again!)
This won't work if you have nested span tags -Original Message- From: Scott Stroz [mailto:[EMAIL PROTECTED] Sent: 03 December 2004 18:12 To: CF-Talk Subject: Re: RegEx (again!) Actually, this is something you can easily do with RegEx. reReplaceNoCase(textString, span(.*?)/span, \1,ALL) Should remove all span and /span tags where no attributes are set, but leave whatever is in between.. On Fri, 3 Dec 2004 09:39:01 -0500, Duane Boudreau [EMAIL PROTECTED] wrote: I start with PSPANDuane/SPAN/PPSPAN style=text[EMAIL PROTECTED]/SPAN/P I want to end with PDuane/PPSPAN style=text[EMAIL PROTECTED]/SPAN/P I want to remove the span tag without attributes and its ending tag, leaving behind what ever text was in between. Duane -Original Message- From: Dawson, Michael [mailto:[EMAIL PROTECTED] Sent: Thursday, December 02, 2004 8:42 PM To: CF-Talk Subject: RE: RegEx (again!) I'm a bit confused. Are you wanting to remove all SPAN tags and leave everything else? Can you give an example of what you want the text to look like AFTER the regex operation? Thanks -Original Message- From: Duane Boudreau [mailto:[EMAIL PROTECTED] Sent: Thursday, December 02, 2004 6:58 PM To: CF-Talk Subject: RegEx (again!) I thought I was finally catching on to this regex stuff but I guess not. I am using a tag from the developer exchange that strips a bunch of extra html that Word inserts into an HTML document. The text left over leaves a lot of extra spanxyx/span formatting. Since the opening span is empty I would like to remove them from the text. I tried this but no luck. textString = PSPANbDuane Boudreau/b/SPAN/PPSPAN[EMAIL PROTECTED]/SPAN/P; textString = reReplaceNoCase(textString, span([^/span]*)/span, \1, ALL); I thought that the text between the () meant all text except /span between the opening string span and the next /span What am I doing wrong here? Thanks, Duane ~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186122 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: Convert Textarea to List?
Keep in mind that the return differs from system to system. It could be Chr(13)Chr(10), but also chr(10) or even Chr(13). An alternative would be CommaSeperatedList = ListChangeDelims(form.myList,,,chr(10) chr(13)) This would work, no matter what system you are on. Pascal -Original Message- From: Martin Parry [mailto:[EMAIL PROTECTED] Sent: 25 November 2004 18:03 To: CF-Talk Subject: RE: Convert Textarea to List? cfset CommaSeperatedList = replace(form.myList, chr(13), ,, All) Just replace form.myList with the correct form field name. Should work Martin Parry Macromedia Certified Developer http://www.BeetrootStreet.com ~| 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:185421 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: Multiple Queries - Is this possible?
Can you explain this? Do you mean with cfoutput?? Maybe you can give a code example? Pascal -Original Message- From: Ian Littlefair [mailto:[EMAIL PROTECTED] Sent: 26 November 2004 14:38 To: CF-Talk Subject: Multiple Queries - Is this possible? I have six queries all using the same database and based on order_number. Is there a way that if an order_number appears in query1 and query2 I can show the order_number in query2 output only and not also in query1 and so on with all the six queries. TIA ~| 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:185436 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: Multiple Queries - Is this possible?
If you really need the 6 queries, you can do something like cfloop query=q1 #q1.ORDER_NUMBER#br /cfloop cfset lOrderNumber = ValueList(q1.ORDER_NUMBER) cfloop query=q2 cfif NOT ListFind(lOrderNumber,q2.ORDER_NUMBER) #q2.ORDER_NUMBER#br /cfif /cfloop cfset lOrderNumber = ListAppend(lOrderNumber,ValueList(q2.ORDER_NUMBER)) cfloop query=q3 cfif NOT ListFind(lOrderNumber,q3.ORDER_NUMBER) #q3.ORDER_NUMBER#br /cfif /cfloop But it looks like you are retrieving the same data from the same table, so maybe you only need one query. Pascal -Original Message- From: Ian Littlefair [mailto:[EMAIL PROTECTED] Sent: 26 November 2004 15:38 To: CF-Talk Subject: Re: Multiple Queries - Is this possible? Ok here are the six queries. I want 1)select ORDER_NUMBER, sub_zone from ame_nemesis_ordrep where week = '#url.week#' and channel_driver = 1 and exists (select 'x' from nem_cds_summ ncs where ncs.order_NO=ORDER_NUMBER and css_database=sub_zone and week = week_number and visits is null) order by sub_zone ~| 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:185445 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: Photo slideshow.
I would create a table for it (or maybe even two) Table 1: slideshow (not really necessary if you have no other fields except the PK) slideshowId (PK) any other fields related to the slideshow (owner, title, ...) Table 2: photo photoId (PK) slideshowId (FK) photoFile photoDesc photoOrder Pascal -Original Message- From: Stuart Kidd [mailto:[EMAIL PROTECTED] Sent: 25 November 2004 12:34 To: CF-Talk Subject: Photo slideshow. Hi guys, On my CMS i want to be able to add a photo slideshow whereby you can upload as many photographs as you like with a bit of accompanying text for each. I was thinking of having 2 columns; PhotoDescriptionList and PhotoLocationList. The first, PhotoDescriptionList would be a comma-separated list of the descriptions, the PhotoLocationList would be the corresponding list of locations of the photographs eg. /images/photoslides/24_233.jpg,/images/photoslides/24_233.jpg,/images/ph ot oslides/24_233.jpg,/images/photoslides/24_234.jpg Do you think that this is the best way to do it? Also, should the column type be varchar and how many characters? I am new to using SQL as before I was using Access and would use the 'TEXT' attribute. Thanks for your help, Saturday ~| 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:185382 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: Javascript Problem
Assuming they have the same name: function getData(form) { for(var i=0;iform.UsageCsaId.length;i++){ form.OriginalCompanyCode[i].value = originalCompany[form.UsageCsaId[i].selectedIndex]; } } If they have different names, just repeat the code in your function 10 times with the appropriate names Pascal -Original Message- From: Issac Rosa [mailto:[EMAIL PROTECTED] Sent: 22 November 2004 23:02 To: CF-Talk Subject: OT: Javascript Problem Sorry for the OT, but thought someone on here might have a quick solution. I need to change this form to have 10 input rows. How would I modify the JS below to handle the 10 rows of selects and linked text input? HTML HEAD TITLEParallel Array Lookup/TITLE SCRIPT LANGUAGE=JavaScript // the data var UsageCsaId = new Array(ABERDEEN,AGOURA,AGUADILLA,AKRON); var originalCompany = new Array(6410,8728,1260,6613); // do the lookup into parallel arrays function getData(form) { var i = form.UsageCsaId.selectedIndex form.OriginalCompanyCode.value = originalCompany[i] } /SCRIPT /HEAD BODY onLoad=getData(document.frmMaintenance) H1Parallel Array Lookup/H1 HR FORM NAME=frmMaintenance SELECT NAME=UsageCsaId onChange=getData(this.form) OPTIONABERDEEN OPTIONAGOURA OPTIONAGUADILLA OPTIONAKRON /SELECT INPUT TYPE=text NAME=OriginalCompanyCode SIZE=4 readonly /BODY /HTML Thanks, Issac ~| 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:185109 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: Listfind Question
Euh? cfx tags run on 4.5. Pascal But as Neil said, just use ListToArray() -Original Message- From: Trevor Holm-Laursen [mailto:[EMAIL PROTECTED] Sent: 23 November 2004 14:47 To: CF-Talk Subject: RE: Listfind Question Looks great but can't install cfx tags on this host. They're only running 4.5 and we can't convince the client to move. ~| 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:185155 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: Is this cftransaction going to work?
No, by default it will rollback if one fails -Original Message- From: gabriel l smallman [mailto:[EMAIL PROTECTED] Sent: 23 November 2004 17:25 To: CF-Talk Subject: RE: Is this cftransaction going to work? I think you have to explictly state a rollback, by default the transaction tag only does locking I think. cftransaction action=ROLLBACK -Original Message- From: Ian Skinner [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 23, 2004 11:18 AM To: CF-Talk Subject: Is this cftransaction going to work? If I have a block of code that is going to call several queries, and I have placed the queries into functions of a CFC, can I wrap these calls into a single transaction? Basically I will have something like this. !--- Update several related tables --- cftransaction cfinvoke component=#dataObj# method=updateTable1 cfinvoke component=#dataObj# method=deleteTable2 ... cfloop from=1 to=#something# index=i cfif this EQ that cfinvoke component=#dataObj# method=insertTable2 ... cfelse cfinvoke component=#dataObj# method=updateTable2 ... /cfif /cfloop /cftransaction Will the cftransaction work here allowing all these queries to be rolled back if any where to fail? -- Ian Skinner Web Programmer BloodSource file:///C:\Documents%20and%20Settings\iskinner\Application%20Data\Micro so ft \Signatures\www.BloodSource.org www.BloodSource.org http://www.BloodSource.orgSacramento 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. ~| 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:185182 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: Splitting up output queries.
It depends on what defines a paragraph in #article1#. Let's say it's a br tag P = br; img = img ...br i = FindNoCase(article1,p); if(i) article = Insert(img,article1,i-1+Len(p)); else article = article1 img; Then you can use article for display. You can turn it into a UDF if you need to do this more than once (Maybe the UDF already exists on cflib, I didn't check). Pascal -Original Message- From: Stuart Kidd [mailto:[EMAIL PROTECTED] Sent: 20 November 2004 13:11 To: CF-Talk Subject: Splitting up output queries. Hi guys, I'm pulling info for an article from my database. However, I'd like to split the text up so I can insert images in between. How can I do this? cfoutput #article1#br img src=something.jpgbr #article1# /cfoutput I'd like the my article to display say one paragraph of #article# and then display a .jpg and then display the rest of #article#. Any help would be appreciated, Thanks. Saturday. ~| 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:184952 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: Splitting up output queries.
Neither, it inserts CR/LF. If it comes from a textarea and you want the crlf to be visible in html, you have to replace them with br tags. (Look at the function paragraphformat()) Pascal -Original Message- From: Stuart Kidd [mailto:[EMAIL PROTECTED] Sent: 20 November 2004 14:42 To: CF-Talk Subject: Re: Splitting up output queries. Hi Pascal, The text which is in the article field in my DB was inserted from a textarea form, do you know whether that would insert p breaks or br breaks? Stu On 20/11/04 1:06 pm, Pascal Peters [EMAIL PROTECTED] wrote: It depends on what defines a paragraph in #article1#. Let's say it's a br tag P = br; img = img ...br i = FindNoCase(article1,p); if(i) article = Insert(img,article1,i-1+Len(p)); else article = article1 img; Then you can use article for display. You can turn it into a UDF if you need to do this more than once (Maybe the UDF already exists on cflib, I didn't check). Pascal -Original Message- From: Stuart Kidd [mailto:[EMAIL PROTECTED] Sent: 20 November 2004 13:11 To: CF-Talk Subject: Splitting up output queries. Hi guys, I'm pulling info for an article from my database. However, I'd like to split the text up so I can insert images in between. How can I do this? cfoutput #article1#br img src=something.jpgbr #article1# /cfoutput I'd like the my article to display say one paragraph of #article# and then display a .jpg and then display the rest of #article#. Any help would be appreciated, Thanks. Saturday. ~| 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:184954 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: Splitting up output queries.
I would do that on display. I prefer keeping the data clean in the db, so I can format it any way I want. I don't store HTML in the db (unless it's for a CMS of course) Pascal -Original Message- From: Stuart Kidd [mailto:[EMAIL PROTECTED] Sent: 20 November 2004 14:50 To: CF-Talk Subject: Re: Splitting up output queries. Okay, so I know that function, I'll format them into paragraphs then before inserting them into the db. Thanks, Stu On 20/11/04 1:47 pm, Pascal Peters [EMAIL PROTECTED] wrote: Neither, it inserts CR/LF. If it comes from a textarea and you want the crlf to be visible in html, you have to replace them with br tags. (Look at the function paragraphformat()) Pascal ~| 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:184956 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: Counting and looping
!--- Calculate totals for each major cfset stCount = StructNew() cfloop query=summary cfif NOT StructKeyExists(stCount,summary.major) cfset stCount[summary.major] = 0 /cfif cfset stCount[summary.major] = stCount[summary.major] + summary.tstuds /cfloop cfdump var=#stCount# Pascal PS1: If ID is your PK, distinct, count(id) and GROUP BY are just overhead PS2: Need I repeat?? CFQUERYPARAM !!! -Original Message- From: James Watkins [mailto:[EMAIL PROTECTED] Sent: 18 November 2004 23:28 To: CF-Talk Subject: Counting and looping I am trying to count individual id's in each major but can't see to get the thing right. Any help would be appreciated: (Oracle SQL) CFQUERY NAME=summary DATASOURCE=NGTbanner SELECT distinct majr_code1 major, id, count(id) tstuds, last_name, first_name, styp_code stype, camp_code, total_credit_hours chrs, ests_code rstatus, sysdate, decode(camp_code,'1','Clarkesville','2','Blairsville','3','Currahee','9' ,'Internet') camp from as_student_enrollment_summary where term_code_key = '#term#' and levl_code = '50' and registered_ind = 'Y' and camp_code like '#campus#' Group by majr_code1, id, last_name, first_name, styp_code, camp_code, total_credit_hours, ests_code, sysdate order by #sort# /CFQUERY ~| 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:184845 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 Help Needed
This isn't how it works (or how BarneyB explained it). The statement is always INSERT INTO, followed by either VALUES or a SELECT statement. The select statement can have any result, as long as it has the same number of columns and the column datatypes match. So, your statement should probably look like this: INSERT INTO tblProducts (ProdName, ProdDesc, ProdSRP, ProdPrice, ProdCost, SubcatID) SELECT name, description, srp, price, cost, subcategoryID FROM dolls_backup Pascal -Original Message- From: Donna French [mailto:[EMAIL PROTECTED] Sent: 18 November 2004 23:13 To: CF-Talk Subject: Re: SQL Help Needed Okay, here's what I've come up with we'll see how it goes... SELECT lanesID, subcategoryID, name, availability, price, srp, cost, description FROM dolls_backup INSERT INTO tblProducts(ProdName, ProdDesc, ProdSRP, ProdPrice, ProdCost, SubcatID) VALUES (dolls_backup.name, dolls_backup.description, dolls_backup.srp, dolls_backup.cost, dolls_backup.subcategoryID) ~ Donna ~| 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:184846 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: Reference to complex var not destroyed
I think it is you who is misunderstanding Dave. request.a = StructNew(); //creates a structure with reference request.a request.b = request.a; //creates a reference request.b to the same structure StructDelete(request,a); // deletes the REFERENCE request.a (not the structure) I don't know the inner workings of CF, but I suspect that if you then do StructDelete(request,b); the structure still exists, but there is simply no way to reference it anymore (I could be wrong here) Pascal -Original Message- From: Taco Fleur [mailto:[EMAIL PROTECTED] Sent: 18 November 2004 06:21 To: CF-Talk Subject: RE: Reference to complex var not destroyed This is the correct behavior in CF as well as in any other language I know of in which you can pass values by reference. The conceptual error you're making is that there is no original structure - there is simply a structure that has one or more references. When you create a structure and put it in a variable, that variable contains a reference to the structure, rather than the structure itself. Dave, I don't think you understand me correctly, I understand that a REFERENCE is created and not a copy of the structure itself, if you read my message again you might see this. My question is: why is the reference not destroyed when the original structure is? When I update the original structure with another value the reference is updated, but why not destroyed? ~| 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:184706 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: Reference to complex var not destroyed
I don't think you are understanding what we are saying here. You are NOT deleting the original, but you are deleting your first REFERENCE to the original object. In CF, there is no way to actually delete the structure OBJECT, only references to it. It could be that, when you delete the last reference to the object, CF deletes the object itself. Or maybe CF doesn't and the garbage collector does it later. Anyway, when you delete the last reference, you have no way of accessing the object anymore. This is a code example that will maybe clarify this (creating a new one instead of deleting) cfscript request.a = StructNew(); request.a.test = Ingewikkelde structuur; request.b = request.a; /cfscript cfdump var=#request# cfset request.a.test = Gewijzigde ingewikkelde structuur cfdump var=#request# cfscript request.a = StructNew(); // pointing the first reference to another struct request.a.othertest = New structure, but b still exists; /cfscript cfdump var=#request# Pascal -Original Message- From: Taco Fleur [mailto:[EMAIL PROTECTED] Sent: 18 November 2004 10:16 To: CF-Talk Subject: RE: Reference to complex var not destroyed I think it is you who is misunderstanding Dave. Could be.. But, what both of you are saying I thought I already understood, and I thought I explained that in my message? If you update the original, the reference gets updated, so when you would delete the original you would think the reference gets deleted as well, or would you not? How does that work in other languages? Or am I just not getting it? Example: cfapplication name=test sessionmanagement=Yes cfset application.test = structNew() cfset application.test.blabla = ingewikkelde structure cfset server.test = application.test cfset structdelete(application, test) cfdump var=#server# / I would think the test var in the server scope would be gone too (or at least I hoped it would). cfdump var=#application# / ~| 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:184710 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: QofQ Problem
The problem is that CF is guessing the data type of the column by looking at the values in the first row. In this case CF thinks the column contains numeric data (because of the 10902 in the first row). This was discussed several times on this list and there should be solutions in the archives. Can't you extract the data directly from the XML? If you want to use QofQ, you can insert a bogus record on top with the correct data types in it. Just see that you don't extract it. Pascal -Original Message- From: Andrew Dixon [mailto:[EMAIL PROTECTED] Sent: 18 November 2004 11:16 To: CF-Talk Subject: QofQ Problem Hi Everyone. I have a strange QofQ problem. The error message I'm getting is: USA must be interprettable as a valid number in the current locale. The column that contains the word USA is a column that contains both letters and numbers, for example: 10902 10909 USA HPH NO2H32 It appears to be something to do with certain data sets are other with similar data work ok. The original data comes from an XML data feed that I have transformed into a query and that wish to extract only some of the data from using a QofQ. Has anyone else come across that problem??? If so have you got a fix? BTW, using CFMX6.1 + updater. ~| 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:184711 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: QofQ Problem
You can use XPath with XMLSearch(). Pascal -Original Message- From: Andrew Dixon [mailto:[EMAIL PROTECTED] Sent: 18 November 2004 11:44 To: CF-Talk Subject: Re: QofQ Problem Hi Pascal Thanks for that, inserting the dummy record works. Can I extract the data directly from the XML? I need to query the data to extract only certain records, is there a CF function to do this? Andrew. On Thu, 18 Nov 2004 11:28:15 +0100, Pascal Peters [EMAIL PROTECTED] wrote: The problem is that CF is guessing the data type of the column by looking at the values in the first row. In this case CF thinks the column contains numeric data (because of the 10902 in the first row). This was discussed several times on this list and there should be solutions in the archives. Can't you extract the data directly from the XML? If you want to use QofQ, you can insert a bogus record on top with the correct data types in it. Just see that you don't extract it. Pascal -Original Message- From: Andrew Dixon [mailto:[EMAIL PROTECTED] Sent: 18 November 2004 11:16 To: CF-Talk Subject: QofQ Problem Hi Everyone. I have a strange QofQ problem. The error message I'm getting is: USA must be interprettable as a valid number in the current locale. The column that contains the word USA is a column that contains both letters and numbers, for example: 10902 10909 USA HPH NO2H32 It appears to be something to do with certain data sets are other with similar data work ok. The original data comes from an XML data feed that I have transformed into a query and that wish to extract only some of the data from using a QofQ. Has anyone else come across that problem??? If so have you got a fix? BTW, using CFMX6.1 + updater. ~| 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:184714 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: Returning javascript variables to CFMX via hidden fields.
Your option tags don't have values (not something I would recommend). FF is picking up the text as the value, but IE isn't. Just change your code to mystr3 += ((mystr3.length0)?|:) + m2.options[i].text Of course, a better solution would be to actually use the values of your options (both in the tags and in your JS functions). Pascal var mystr3 = for (i=0; im2.length; i++) { mystr3 = mystr3 + | + m2.options[i].value } document.theForm.result_set1.value=mystr3 } ~| 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:184529 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