Re: restricting cfoutput character length
Saturday (Stuart Kidd) wrote: Hi, I'm trying to do something which i can imagine is very simple but can't find the function. When i display a title cfoutput#myTitle#/cfoutput i'd like to just display the first 15 characters and if more then put three dots (periods). I know the LEN function but i can't work out how to replace the text with dots after the 15th character. #IIF(Len(fieldname) GT 15, DE(Left(fieldname, 15) ...), DE(fieldname))# ~| 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:219565 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: Idea for better hosting
Hi, can you run CFMX on Windows Server 2003, Web Edition i was told you cant, that it doesnt support it ? -Original Message- From: Emmet McGovern [mailto:[EMAIL PROTECTED] Sent: Thursday, 29 September 2005 12:08 PM To: CF-Talk Subject: RE: Idea for better hosting The original post is set in some bizarre dream world. Clustering bad code just means bad code running on 3 servers. Let's look at the costs anyway. We'll cut corners when we can and look at sticky sessions on standard cf licenses too. ---WINDOWS--- Servers x 3 $4200 - $6600 Windows Server 2003, Standard Edition x3$2,997 CF Enterprise x3$17,997 --- TOTAL: $25,194 - $27,594 Servers x 3 $4200 - $6600 Windows Server 2003, Web Edition x3 $1,200 CF Standard x3 $3,897 --- TOTAL: $9,297 - $11,697 ---LINUX--- Servers x 3 $4200 - $6600 Redhat Linux ES x3 $1,047 CF Enterprise x3$17,997 --- TOTAL: $23,244 - $25,644 Servers x 3 $4200 - $6600 FEDORA x3 $FREE CF Standard x3 $3,897 --- TOTAL: $8,097 - $10,497 So you can budget for $8,097 - $27,594 With 400 clients at $15-$30 a month you get $6,000 - $12,000 a month. I'm frickin RICH BIATCH! Lease me a BMW! except... Now you need a way to load balance. Hardware - $3000-$1 Software NLB - $FREE Damn... Your rack is filling up fast. $1200-2000 per month per rack. Holy crap! We're out of room on the switch again. $600 File replication shut down again. Wheres Larry the tech? - $30-$80k salary $%#! CRC errors on the NLB!!! Where's Larry's brother Larry? $30-$80k yr Sally from Sallysellsseashells.com can't get her mail. Support - $24-$35 yr These expenses are killing us. Where's Rich the sales guy? - $24k base YAY!!! Were growing! We need to hire some more people. Shit. I just missed the lease payment on my BMW. DAMN YOU COLDFUSION Takin the bus to the office (if I could afford the office), Emmet ~| 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:219566 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: Idea for better hosting
Yes you can. The Web Edition is a web server, thus the name. So it wont let you run certain other MS products such as SQL Server which require Windows 2003 Server std. But it cannot stop installing any 3rd party product. Russ -Original Message- From: Joel Nath [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 08:45 To: CF-Talk Subject: RE: Idea for better hosting Hi, can you run CFMX on Windows Server 2003, Web Edition i was told you cant, that it doesnt support it ? -Original Message- From: Emmet McGovern [mailto:[EMAIL PROTECTED] Sent: Thursday, 29 September 2005 12:08 PM To: CF-Talk Subject: RE: Idea for better hosting The original post is set in some bizarre dream world. Clustering bad code just means bad code running on 3 servers. Let's look at the costs anyway. We'll cut corners when we can and look at sticky sessions on standard cf licenses too. ---WINDOWS--- Servers x 3 $4200 - $6600 Windows Server 2003, Standard Edition x3$2,997 CF Enterprise x3$17,997 --- TOTAL: $25,194 - $27,594 Servers x 3 $4200 - $6600 Windows Server 2003, Web Edition x3 $1,200 CF Standard x3 $3,897 --- TOTAL: $9,297 - $11,697 ---LINUX--- Servers x 3 $4200 - $6600 Redhat Linux ES x3 $1,047 CF Enterprise x3$17,997 --- TOTAL: $23,244 - $25,644 Servers x 3 $4200 - $6600 FEDORA x3 $FREE CF Standard x3 $3,897 --- TOTAL: $8,097 - $10,497 So you can budget for $8,097 - $27,594 With 400 clients at $15-$30 a month you get $6,000 - $12,000 a month. I'm frickin RICH BIATCH! Lease me a BMW! except... Now you need a way to load balance. Hardware - $3000-$1 Software NLB - $FREE Damn... Your rack is filling up fast. $1200-2000 per month per rack. Holy crap! We're out of room on the switch again. $600 File replication shut down again. Wheres Larry the tech? - $30-$80k salary $%#! CRC errors on the NLB!!! Where's Larry's brother Larry? $30-$80k yr Sally from Sallysellsseashells.com can't get her mail. Support - $24-$35 yr These expenses are killing us. Where's Rich the sales guy? - $24k base YAY!!! Were growing! We need to hire some more people. Shit. I just missed the lease payment on my BMW. DAMN YOU COLDFUSION Takin the bus to the office (if I could afford the office), Emmet ~| 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:219567 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 row select?
orig. post bounced with body too long, sending again, will probably duplicate Im not a query analyzer expert, and this wasnt a very scientific experiment, but I thought people might find these server trace results interesting. Test1: approx 10,000 row table Testing: Single Sub Select with IN clause SELECT TOP 20 * FROM objproduct WHERE product_ID not in (SELECT TOP 10020 product_id FROM objproduct ORDER BY product_id) ORDER BY product_id Results: Duration: 78 CPU: 78 Reads: 249 Testing: Triple Sub Select SELECT * FROM (SELECT TOP 20 * FROM (SELECT TOP 10020 * FROM objproduct C ORDER BY C.product_id ASC) B ORDER BY B.product_id DESC) A ORDER BY product_id Results: Duration: 175 CPU: 0 Reads: 67 So it would seem that at around 10,000 rows, the IN clause is quicker, but harder work, whereas the triple select is slower, but less work? Test 2: approx 650,000 row table The results seemed to vary more here, so I have put them in as ranges. Testing: Single Sub Select with IN clause SELECT TOP 50 * FROM logs WHERE logid not in (SELECT TOP 60 logid FROM logs ORDER BY logid ORDER BY logid Duration: 7-253 CPU: 7-253 Reads: 206 Testing: Triple Sub Select SELECT * FROM (SELECT TOP 50 * FROM (SELECT TOP 60 * FROM logs C ORDER BY C.logid ASC) B ORDER BY B.logid DESC) A ORDER BY logid Duration: 11 - 251 CPU: 0-16 Reads: 103 As the durations seemed to even out at around these numbers, while the CPU usage of the triple select was consistently very low, and the reads were consistently half that of the IN clause, the only conclusion that I can draw is that with simple sql at least, the triple select is better? ~| 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:219568 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: Can CF interact with mainframe?
Maloy wrote: I have a basic question: Is there any way to run Cold Fusion on mainframe like MVS or OS/390 operating system. if not, is there a way in which these can interact even when Coldfusion runs on a Windows or Unix server? I don't know what kind of interaction you're talking about, but our entire system is based in large part on data from a mainframe (OS/390) DB2 database. However, we avoid accessing it directly whenever possible. About 4 gigs of data is unloaded into flat delimited files and ftped to our SQL Server box, where it is loaded into SQL Server on a nightly basis. There are also cases where we upload a datafile to the mainframe and then actually submit a batch job to run via an FTP command. Rick ~| 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:219569 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: checksum?
On Wednesday 28 September 2005 19:47, Ryan Guill wrote: what about on win xp? use md5sum. You'll need to install it from Cygwin, of course. -- Tom Chiverton Advanced ColdFusion Programmer ~| 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:219570 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
INNER JOIN
Hi, I've been having trouble with JOINS. My query below works but when i try outputting my results I am getting duplicate authors (authorID). cfquery name=GetAuthors datasource=user020 SELECT tbl_020authorDetails.authorID, tbl_020authorDetails.authorFirstName, tbl_020authorDetails.authorSurname, tbl_020authorDetails.authorPhotograph, tbl_020authorDetails.authorAboutMe, tbl_020articleDetails.articleID, tbl_020articleDetails.articleTitle FROM tbl_020articleDetails INNER JOIN tbl_020authorDetails ON tbl_020articleDetails.authorID = tbl_020authorDetails.authorID WHERE tbl_020authorDetails.authorPhotograph '' /cfquery cfoutput query=GetAuthors group=authorID cfset counter = 0 div class=contributorminibox onclick=javascript:clickarticle(this) div class=contributorphotograph img src=#PhotosWritersWeb##GetAuthors.authorPhotograph# /div div class=contributortext #authorFirstName# #authorSurname# pcfif authorAboutMe eq ''I was born in the outer reaches of the galaxy and ever since first seeing my first book had a desire to write one.cfelse#ParagraphFormat (authorAboutMe)#/cfif/p /div div class=contributorurls A list of my last articles cfoutput br / a href=http://www.020.com/webs/02005/ showArticle.cfm?id=#articleID#cfif len(articleTitle) gt 35#left (articleTitle, 35)#...cfelse#articleTitle#/cfif/a cfset counter = counter + 1 cfif counter EQ 8 /div div class=contributorurls /cfif /cfoutput /div /div div class=contributorname #authorFirstName#br /#authorSurname# /div /cfoutput I tried to make the join a RIGHT JOIN and it seemed to work but then will I add extra criteria to the WHERE i end up getting more duplicate authorIDs. Any help would be grateful, Saturday ~| 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:219571 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: checksum?
I use the microsoft one - fciv.exe http://support.microsoft.com/?kbid=841290 -Original Message- From: Thomas Chiverton [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 10:31 To: CF-Talk Subject: Re: ot: checksum? On Wednesday 28 September 2005 19:47, Ryan Guill wrote: what about on win xp? use md5sum. You'll need to install it from Cygwin, of course. -- Tom Chiverton Advanced ColdFusion Programmer ~| 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:219572 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: INNER JOIN
A quick suggestion, write a test page with the minimum of code in. It'll make it easier for you to debug and easier for us to help. Ade -Original Message- From: Saturday (Stuart Kidd) [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 10:50 To: CF-Talk Subject: INNER JOIN Hi, I've been having trouble with JOINS. My query below works but when i try outputting my results I am getting duplicate authors (authorID). cfquery name=GetAuthors datasource=user020 SELECT tbl_020authorDetails.authorID, tbl_020authorDetails.authorFirstName, tbl_020authorDetails.authorSurname, tbl_020authorDetails.authorPhotograph, tbl_020authorDetails.authorAboutMe, tbl_020articleDetails.articleID, tbl_020articleDetails.articleTitle FROM tbl_020articleDetails INNER JOIN tbl_020authorDetails ON tbl_020articleDetails.authorID = tbl_020authorDetails.authorID WHERE tbl_020authorDetails.authorPhotograph '' /cfquery cfoutput query=GetAuthors group=authorID cfset counter = 0 div class=contributorminibox onclick=javascript:clickarticle(this) div class=contributorphotograph img src=#PhotosWritersWeb##GetAuthors.authorPhotograph# /div div class=contributortext #authorFirstName# #authorSurname# pcfif authorAboutMe eq ''I was born in the outer reaches of the galaxy and ever since first seeing my first book had a desire to write one.cfelse#ParagraphFormat (authorAboutMe)#/cfif/p /div div class=contributorurls A list of my last articles cfoutput br / a href=http://www.020.com/webs/02005/ showArticle.cfm?id=#articleID#cfif len(articleTitle) gt 35#left (articleTitle, 35)#...cfelse#articleTitle#/cfif/a cfset counter = counter + 1 cfif counter EQ 8 /div div class=contributorurls /cfif /cfoutput /div /div div class=contributorname #authorFirstName#br /#authorSurname# /div /cfoutput I tried to make the join a RIGHT JOIN and it seemed to work but then will I add extra criteria to the WHERE i end up getting more duplicate authorIDs. Any help would be grateful, Saturday ~| 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:219573 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: INNER JOIN
Hi, I've simplified it a bit: cfquery name=GetAuthors datasource=user020 SELECT tbl_020authorDetails.authorID, tbl_020authorDetails.authorFirstName, tbl_020authorDetails.authorSurname, tbl_020authorDetails.authorPhotograph, tbl_020authorDetails.authorAboutMe, tbl_020articleDetails.articleID, tbl_020articleDetails.articleTitle FROM tbl_020articleDetails INNER JOIN tbl_020authorDetails ON tbl_020articleDetails.authorID = tbl_020authorDetails.authorID WHERE tbl_020authorDetails.authorPhotograph '' AND tbl_020articleDetails.articleSubTypeID 55 /cfquery cfoutput query=GetAuthors group=authorID pstrong#authorFirstName#/strong/p pmy articles:/p cfoutput#articleTitle#br //cfoutput /cfoutput This is now on a standalone page at: http://www.020.com/testsql.cfm The results are correct but instead of putting all of the articles under the corresponding author it is putting splitting them up and creating duplicate authors. Could it have anything to do with my tables in MS-SQL? Is there something else I have to do like do actual JOINS in the DB and not just in the code? Thanks, Stuart On 29 Sep 2005, at 12:09, Adrian Lynch wrote: A quick suggestion, write a test page with the minimum of code in. It'll make it easier for you to debug and easier for us to help. Ade -Original Message- From: Saturday (Stuart Kidd) [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 10:50 To: CF-Talk Subject: INNER JOIN Hi, I've been having trouble with JOINS. My query below works but when i try outputting my results I am getting duplicate authors (authorID). cfquery name=GetAuthors datasource=user020 SELECT tbl_020authorDetails.authorID, tbl_020authorDetails.authorFirstName, tbl_020authorDetails.authorSurname, tbl_020authorDetails.authorPhotograph, tbl_020authorDetails.authorAboutMe, tbl_020articleDetails.articleID, tbl_020articleDetails.articleTitle FROM tbl_020articleDetails INNER JOIN tbl_020authorDetails ON tbl_020articleDetails.authorID = tbl_020authorDetails.authorID WHERE tbl_020authorDetails.authorPhotograph '' /cfquery cfoutput query=GetAuthors group=authorID cfset counter = 0 div class=contributorminibox onclick=javascript:clickarticle(this) div class=contributorphotograph img src=#PhotosWritersWeb##GetAuthors.authorPhotograph# /div div class=contributortext #authorFirstName# #authorSurname# pcfif authorAboutMe eq ''I was born in the outer reaches of the galaxy and ever since first seeing my first book had a desire to write one.cfelse#ParagraphFormat (authorAboutMe)#/cfif/p /div div class=contributorurls A list of my last articles cfoutput br / a href=http://www.020.com/webs/02005/ showArticle.cfm?id=#articleID#cfif len(articleTitle) gt 35#left (articleTitle, 35)#...cfelse#articleTitle#/cfif/a cfset counter = counter + 1 cfif counter EQ 8 /div div class=contributorurls /cfif /cfoutput /div /div div class=contributorname #authorFirstName#br /#authorSurname# /div /cfoutput I tried to make the join a RIGHT JOIN and it seemed to work but then will I add extra criteria to the WHERE i end up getting more duplicate authorIDs. Any help would be grateful, Saturday ~| 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:219574 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
Weird Flash Remoting Problem and Solution
All, I experienced a strange issue with Flash MX 2004 Pro and CFMX7. When calling functions through the gateway with flash, it appeared that the gateway was being cached. This meant that function names could not change and new functions added would not be available to Flash. A Service Invocation error was experienced on the CF server when calling them. I tried restarting both the CF server and flash, hotfixes, updater, etc and still the problem was there. Eventually I investigated the gateway configuration on the CF server. This is a standard install, with everything at default (except caching CFC's). The solution was to change the \WEB-INF\gateway-config.xml file on the CF server. Near the top there is a section called Service-Adapters. I simply uncommented all relating to Flash there and restarted CF. The Flash SWF is now calling them correctly. As how this fixed, I'm not sure. Maybe someone has an idea out there??? Just thought I'd post this info in case anyone else experienced this strange problem. Gavin ~| 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:219575 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: INNER JOIN
You need to use something like ORDER BY authorID if you're grouping on it. Ian -Original Message- From: Saturday (Stuart Kidd) [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 12:37 To: CF-Talk Subject: Re: INNER JOIN Hi, I've simplified it a bit: cfquery name=GetAuthors datasource=user020 SELECT tbl_020authorDetails.authorID, tbl_020authorDetails.authorFirstName, tbl_020authorDetails.authorSurname, tbl_020authorDetails.authorPhotograph, tbl_020authorDetails.authorAboutMe, tbl_020articleDetails.articleID, tbl_020articleDetails.articleTitle FROM tbl_020articleDetails INNER JOIN tbl_020authorDetails ON tbl_020articleDetails.authorID = tbl_020authorDetails.authorID WHERE tbl_020authorDetails.authorPhotograph '' AND tbl_020articleDetails.articleSubTypeID 55 /cfquery cfoutput query=GetAuthors group=authorID pstrong#authorFirstName#/strong/p pmy articles:/p cfoutput#articleTitle#br //cfoutput /cfoutput This is now on a standalone page at: http://www.020.com/testsql.cfm The results are correct but instead of putting all of the articles under the corresponding author it is putting splitting them up and creating duplicate authors. Could it have anything to do with my tables in MS-SQL? Is there something else I have to do like do actual JOINS in the DB and not just in the code? Thanks, Stuart On 29 Sep 2005, at 12:09, Adrian Lynch wrote: A quick suggestion, write a test page with the minimum of code in. It'll make it easier for you to debug and easier for us to help. Ade -Original Message- From: Saturday (Stuart Kidd) [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 10:50 To: CF-Talk Subject: INNER JOIN Hi, I've been having trouble with JOINS. My query below works but when i try outputting my results I am getting duplicate authors (authorID). cfquery name=GetAuthors datasource=user020 SELECT tbl_020authorDetails.authorID, tbl_020authorDetails.authorFirstName, tbl_020authorDetails.authorSurname, tbl_020authorDetails.authorPhotograph, tbl_020authorDetails.authorAboutMe, tbl_020articleDetails.articleID, tbl_020articleDetails.articleTitle FROM tbl_020articleDetails INNER JOIN tbl_020authorDetails ON tbl_020articleDetails.authorID = tbl_020authorDetails.authorID WHERE tbl_020authorDetails.authorPhotograph '' /cfquery cfoutput query=GetAuthors group=authorID cfset counter = 0 div class=contributorminibox onclick=javascript:clickarticle(this) div class=contributorphotograph img src=#PhotosWritersWeb##GetAuthors.authorPhotograph# /div div class=contributortext #authorFirstName# #authorSurname# pcfif authorAboutMe eq ''I was born in the outer reaches of the galaxy and ever since first seeing my first book had a desire to write one.cfelse#ParagraphFormat (authorAboutMe)#/cfif/p /div div class=contributorurls A list of my last articles cfoutput br / a href=http://www.020.com/webs/02005/ showArticle.cfm?id=#articleID#cfif len(articleTitle) gt 35#left (articleTitle, 35)#...cfelse#articleTitle#/cfif/a cfset counter = counter + 1 cfif counter EQ 8 /div div class=contributorurls /cfif /cfoutput /div /div div class=contributorname #authorFirstName#br /#authorSurname# /div /cfoutput I tried to make the join a RIGHT JOIN and it seemed to work but then will I add extra criteria to the WHERE i end up getting more duplicate authorIDs. Any help would be grateful, Saturday ~| 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:219576 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:
Scripting Window User Additions/Permissions on directories
Hello I'm running windows 2003 server and CFMX 7. Has anybody come across a way of adding users (Active Directory - CFLDAP?), and setting directory permissions under this configuration. Basically, i'm wanting to script addition of FTP users, and set up permissions on the necessary directories for the user i have just created.. Somebody must have done it.. :) Please share! Ryan ~| 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:219577 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: ot: checksum?
use md5sum. You'll need to install it from Cygwin, of course. There are plenty of native Windows implementations of md5sum that don't require Cygwin. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:219578 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: INNER JOIN
Thanks Ian... i think i had fried my brain during the time it took me to create that query from a few days ago until now... :) It works now! Stu On 29 Sep 2005, at 12:42, Ian Tait wrote: You need to use something like ORDER BY authorID if you're grouping on it. Ian -Original Message- From: Saturday (Stuart Kidd) [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 12:37 To: CF-Talk Subject: Re: INNER JOIN Hi, I've simplified it a bit: cfquery name=GetAuthors datasource=user020 SELECT tbl_020authorDetails.authorID, tbl_020authorDetails.authorFirstName, tbl_020authorDetails.authorSurname, tbl_020authorDetails.authorPhotograph, tbl_020authorDetails.authorAboutMe, tbl_020articleDetails.articleID, tbl_020articleDetails.articleTitle FROM tbl_020articleDetails INNER JOIN tbl_020authorDetails ON tbl_020articleDetails.authorID = tbl_020authorDetails.authorID WHERE tbl_020authorDetails.authorPhotograph '' AND tbl_020articleDetails.articleSubTypeID 55 /cfquery cfoutput query=GetAuthors group=authorID pstrong#authorFirstName#/strong/p pmy articles:/p cfoutput#articleTitle#br //cfoutput /cfoutput This is now on a standalone page at: http://www.020.com/testsql.cfm The results are correct but instead of putting all of the articles under the corresponding author it is putting splitting them up and creating duplicate authors. Could it have anything to do with my tables in MS-SQL? Is there something else I have to do like do actual JOINS in the DB and not just in the code? Thanks, Stuart On 29 Sep 2005, at 12:09, Adrian Lynch wrote: A quick suggestion, write a test page with the minimum of code in. It'll make it easier for you to debug and easier for us to help. Ade -Original Message- From: Saturday (Stuart Kidd) [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 10:50 To: CF-Talk Subject: INNER JOIN Hi, I've been having trouble with JOINS. My query below works but when i try outputting my results I am getting duplicate authors (authorID). cfquery name=GetAuthors datasource=user020 SELECT tbl_020authorDetails.authorID, tbl_020authorDetails.authorFirstName, tbl_020authorDetails.authorSurname, tbl_020authorDetails.authorPhotograph, tbl_020authorDetails.authorAboutMe, tbl_020articleDetails.articleID, tbl_020articleDetails.articleTitle FROM tbl_020articleDetails INNER JOIN tbl_020authorDetails ON tbl_020articleDetails.authorID = tbl_020authorDetails.authorID WHERE tbl_020authorDetails.authorPhotograph '' /cfquery cfoutput query=GetAuthors group=authorID cfset counter = 0 div class=contributorminibox onclick=javascript:clickarticle(this) div class=contributorphotograph img src=#PhotosWritersWeb##GetAuthors.authorPhotograph# /div div class=contributortext #authorFirstName# #authorSurname# pcfif authorAboutMe eq ''I was born in the outer reaches of the galaxy and ever since first seeing my first book had a desire to write one.cfelse#ParagraphFormat (authorAboutMe)#/cfif/p /div div class=contributorurls A list of my last articles cfoutput br / a href=http://www.020.com/webs/02005/ showArticle.cfm?id=#articleID#cfif len(articleTitle) gt 35#left (articleTitle, 35)#...cfelse#articleTitle#/cfif/a cfset counter = counter + 1 cfif counter EQ 8 /div div class=contributorurls /cfif /cfoutput /div /div div class=contributorname #authorFirstName#br /#authorSurname# /div /cfoutput I tried to make the join a RIGHT JOIN and it seemed to work but then will I add extra criteria to the WHERE i end up getting more duplicate authorIDs. Any help would be grateful, Saturday ~| 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:219579 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Re: applications in applications
You could do it the way you suggested, but I have a feeling that will lead to problems down the line. Maybe something like this - http://shibboleth.internet2.edu/ - along with an application management framework (even for applications around your university) is what you need. But it might be overkill if you are the only one in the campus wanting this kind of management. I don't know if my suggestion would help, but I am just throwing out the information and some thoughts from my experience. Thanks you and I'll look it over, but I'm more likely to finish the solution that I have. It seems that I just need the applications to see if they've already been logged on at the site level, rather than at their directory and if so, have the application set their login to true or in my case, set session.ldap_id = '#their_id#'. ~| 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:219580 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: ot: checksum?
On Thursday 29 September 2005 13:00, Dave Watts wrote: There are plenty of native Windows implementations of md5sum that don't require Cygwin. Yeah, I'm just on a mission this week to convince people that GNU software runs on Windows :-) -- Tom Chiverton Advanced ColdFusion Programmer ~| 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:219581 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
Now more query problems... boo hoo
Jumping from one query problem to another... just when it was safe to to run a query another problem leapt out of the dungeons. I would like to only pull the top 8 authors who have the most articles (articleID) I have specified only to get the 8 maxrows but the problem i'm having is when i try to add to the ORDER BY COUNT(articleID) DESC My error is: [Macromedia][SQLServer JDBC Driver][SQLServer]Column 'tbl_020authorDetails.authorID' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause. It can be seen at: http://www.020.com/testsql.cfm cfquery name=GetAuthors datasource=user020 maxrows=8 SELECT tbl_020authorDetails.authorID, tbl_020authorDetails.authorFirstName, tbl_020authorDetails.authorSurname, tbl_020authorDetails.authorPhotograph, tbl_020authorDetails.authorAboutMe, tbl_020articleDetails.articleID, tbl_020articleDetails.articleTitle FROM tbl_020articleDetails INNER JOIN tbl_020authorDetails ON tbl_020articleDetails.authorID = tbl_020authorDetails.authorID WHERE tbl_020authorDetails.authorPhotograph '' AND tbl_020articleDetails.articleSubTypeID 55 ORDER BY tbl_020authorDetails.authorID, COUNT(articleID) DESC /cfquery cfoutput query=GetAuthors group=authorID pstrong#authorFirstName#/strong/p pmy articles:/p cfoutput#articleTitle#br //cfoutput /cfoutput Any help would be great. Thanks, Stuart ~| 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:219582 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
clear session variables for testing
Good Morning, Is there an easy way to clear all session variables? It would help me test for behaviors after session variables have timed out. Thanks, Mark ~| 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:219583 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: Now more query problems... boo hoo
You can't use COUNT in the ORDER BY clause. (Please someone back me up here else I'm off to spend some time with Book Online!). Ade -Original Message- From: Saturday (Stuart Kidd) [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 13:20 To: CF-Talk Subject: Now more query problems... boo hoo Jumping from one query problem to another... just when it was safe to to run a query another problem leapt out of the dungeons. I would like to only pull the top 8 authors who have the most articles (articleID) I have specified only to get the 8 maxrows but the problem i'm having is when i try to add to the ORDER BY COUNT(articleID) DESC My error is: [Macromedia][SQLServer JDBC Driver][SQLServer]Column 'tbl_020authorDetails.authorID' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause. It can be seen at: http://www.020.com/testsql.cfm cfquery name=GetAuthors datasource=user020 maxrows=8 SELECT tbl_020authorDetails.authorID, tbl_020authorDetails.authorFirstName, tbl_020authorDetails.authorSurname, tbl_020authorDetails.authorPhotograph, tbl_020authorDetails.authorAboutMe, tbl_020articleDetails.articleID, tbl_020articleDetails.articleTitle FROM tbl_020articleDetails INNER JOIN tbl_020authorDetails ON tbl_020articleDetails.authorID = tbl_020authorDetails.authorID WHERE tbl_020authorDetails.authorPhotograph '' AND tbl_020articleDetails.articleSubTypeID 55 ORDER BY tbl_020authorDetails.authorID, COUNT(articleID) DESC /cfquery cfoutput query=GetAuthors group=authorID pstrong#authorFirstName#/strong/p pmy articles:/p cfoutput#articleTitle#br //cfoutput /cfoutput Any help would be great. Thanks, Stuart ~| 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:219584 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: clear session variables for testing
StructClear(SESSION) Ade -Original Message- From: Mark Fuqua [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 13:23 To: CF-Talk Subject: clear session variables for testing Good Morning, Is there an easy way to clear all session variables? It would help me test for behaviors after session variables have timed out. Thanks, Mark ~| 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:219585 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: clear session variables for testing
structClear() actually deletes other info that you might wish to keep, like cfid stuff. Your better of always setting your session variables in another structure, i.e. Session.user.username = blah; Session.user.firstname = blah; That way when you only want to expire the user details of the session you can just do structDelete( session, user ) It gives you more control. Taco Fleur - Pacific Fox an industry leader with commercial IT experience since 1994 . http://www.pacificfox.com - Web Design and Development -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Thursday, 29 September 2005 10:31 PM To: CF-Talk Subject: RE: clear session variables for testing StructClear(SESSION) Ade -Original Message- From: Mark Fuqua [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 13:23 To: CF-Talk Subject: clear session variables for testing Good Morning, Is there an easy way to clear all session variables? It would help me test for behaviors after session variables have timed out. Thanks, Mark ~| 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:219586 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: Now more query problems... boo hoo
I did try to use COUNT(tbl_020articleDetails.articleID) AS totalArticles but came up with the error: [Macromedia][SQLServer JDBC Driver][SQLServer]Column 'tbl_020authorDetails.authorID' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause. cfquery name=GetAuthors datasource=user020 maxrows=8 SELECT tbl_020authorDetails.authorID, tbl_020authorDetails.authorFirstName, tbl_020authorDetails.authorSurname, tbl_020authorDetails.authorPhotograph, tbl_020authorDetails.authorAboutMe, COUNT(tbl_020articleDetails.articleID) AS totalArticles, tbl_020articleDetails.articleTitle FROM tbl_020articleDetails INNER JOIN tbl_020authorDetails ON tbl_020articleDetails.authorID = tbl_020authorDetails.authorID WHERE tbl_020authorDetails.authorPhotograph '' AND tbl_020articleDetails.articleSubTypeID 55 ORDER BY tbl_020authorDetails.authorID /cfquery cfoutput query=GetAuthors group=authorID pstrong#authorFirstName#/strong/p pmy articles:/p cfoutput#articleTitle#br //cfoutput /cfoutput On 29 Sep 2005, at 13:30, Adrian Lynch wrote: You can't use COUNT in the ORDER BY clause. (Please someone back me up here else I'm off to spend some time with Book Online!). Ade ~| 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:219587 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: Now more query problems... boo hoo
You can use it in the order by clause, he just needs to group all the columns in his query with GROUP BY. Taco Fleur - Pacific Fox an industry leader with commercial IT experience since 1994 . http://www.pacificfox.com - Web Design and Development -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Thursday, 29 September 2005 10:30 PM To: CF-Talk Subject: RE: Now more query problems... boo hoo You can't use COUNT in the ORDER BY clause. (Please someone back me up here else I'm off to spend some time with Book Online!). Ade -Original Message- From: Saturday (Stuart Kidd) [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 13:20 To: CF-Talk Subject: Now more query problems... boo hoo Jumping from one query problem to another... just when it was safe to to run a query another problem leapt out of the dungeons. I would like to only pull the top 8 authors who have the most articles (articleID) I have specified only to get the 8 maxrows but the problem i'm having is when i try to add to the ORDER BY COUNT(articleID) DESC My error is: [Macromedia][SQLServer JDBC Driver][SQLServer]Column 'tbl_020authorDetails.authorID' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause. It can be seen at: http://www.020.com/testsql.cfm cfquery name=GetAuthors datasource=user020 maxrows=8 SELECT tbl_020authorDetails.authorID, tbl_020authorDetails.authorFirstName, tbl_020authorDetails.authorSurname, tbl_020authorDetails.authorPhotograph, tbl_020authorDetails.authorAboutMe, tbl_020articleDetails.articleID, tbl_020articleDetails.articleTitle FROM tbl_020articleDetails INNER JOIN tbl_020authorDetails ON tbl_020articleDetails.authorID = tbl_020authorDetails.authorID WHERE tbl_020authorDetails.authorPhotograph '' AND tbl_020articleDetails.articleSubTypeID 55 ORDER BY tbl_020authorDetails.authorID, COUNT(articleID) DESC /cfquery cfoutput query=GetAuthors group=authorID pstrong#authorFirstName#/strong/p pmy articles:/p cfoutput#articleTitle#br //cfoutput /cfoutput Any help would be great. Thanks, Stuart ~| 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:219588 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: clear session variables for testing
This should kill everything and start you off with a clean plate. CFSET STRUCTCLEAR(APPLICATION) CFSET STRUCTCLEAR(SESSION) CFLOOP INDEX=X LIST=#GetClientVariablesList()# CFSET DELETED = DELETECLIENTVARIABLE(#X#) /CFLOOP CFCOOKIE NAME=cfid EXPIRES=NOW CFCOOKIE NAME=cftoken EXPIRES=NOW CFCOOKIE NAME=cfglobals EXPIRES=NOW Emmet -Original Message- From: Mark Fuqua [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 8:23 AM To: CF-Talk Subject: clear session variables for testing Good Morning, Is there an easy way to clear all session variables? It would help me test for behaviors after session variables have timed out. Thanks, Mark ~| 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:219589 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: Now more query problems... boo hoo
Now where did I put my BOL?! :OS -Original Message- From: Taco Fleur [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 13:38 To: CF-Talk Subject: RE: Now more query problems... boo hoo You can use it in the order by clause, he just needs to group all the columns in his query with GROUP BY. Taco Fleur - Pacific Fox an industry leader with commercial IT experience since 1994 . http://www.pacificfox.com - Web Design and Development -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Thursday, 29 September 2005 10:30 PM To: CF-Talk Subject: RE: Now more query problems... boo hoo You can't use COUNT in the ORDER BY clause. (Please someone back me up here else I'm off to spend some time with Book Online!). Ade -Original Message- From: Saturday (Stuart Kidd) [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 13:20 To: CF-Talk Subject: Now more query problems... boo hoo Jumping from one query problem to another... just when it was safe to to run a query another problem leapt out of the dungeons. I would like to only pull the top 8 authors who have the most articles (articleID) I have specified only to get the 8 maxrows but the problem i'm having is when i try to add to the ORDER BY COUNT(articleID) DESC My error is: [Macromedia][SQLServer JDBC Driver][SQLServer]Column 'tbl_020authorDetails.authorID' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause. It can be seen at: http://www.020.com/testsql.cfm cfquery name=GetAuthors datasource=user020 maxrows=8 SELECT tbl_020authorDetails.authorID, tbl_020authorDetails.authorFirstName, tbl_020authorDetails.authorSurname, tbl_020authorDetails.authorPhotograph, tbl_020authorDetails.authorAboutMe, tbl_020articleDetails.articleID, tbl_020articleDetails.articleTitle FROM tbl_020articleDetails INNER JOIN tbl_020authorDetails ON tbl_020articleDetails.authorID = tbl_020authorDetails.authorID WHERE tbl_020authorDetails.authorPhotograph '' AND tbl_020articleDetails.articleSubTypeID 55 ORDER BY tbl_020authorDetails.authorID, COUNT(articleID) DESC /cfquery cfoutput query=GetAuthors group=authorID pstrong#authorFirstName#/strong/p pmy articles:/p cfoutput#articleTitle#br //cfoutput /cfoutput Any help would be great. Thanks, Stuart ~| 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:219590 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: applications in applications
if you want this done on a single server, its not hard. I have it setup in my company like this. Basicaly each application uses two cfapplication tags, one with name MAIN first and second with the name of the app. After the first one I do a check to see if the user is logged in to MAIN, if not I redirect them to a central /login dir which uses a cfapplication tag with name MAIN. After login they are redirected back to the app. At this poit the test for being logged in to MAIN passes and then the second cfapplication tag kicks in. Then I test to see if the user has access to the local app. THat's it in a nutshell. If all your apps on one server are CF based, this can work fine and dandy. Here is an example...note each app has a login subdir that does the auth stuffs. This would be the application.cfm from it. !--- begin editable area here --- cfset appurl = '/path/back/to/the/local/app/login/!--- this MUST be the URL to your app...absolute path is required --- cfset message = 'My app name'/!--- optional: show message on CENTRAL login page --- !--- end editable area here --- !--- do not edit this --- cfapplication name=main sessionmanagement=Yes sessiontimeout=#CreateTimeSpan(0,2,0,0)# cfparam name=session.main.globalauthorized default=0 / cfif session.main.globalauthorized NEQ 1 cflocation url=/login?appurl=#URLEncodedFormat(appurl)#message=#URLEncodedFormat(message)# addtoken=no / /cfif !--- make local copy of session data to transfer to other local session scope --- cfset variables.foo = duplicate(session.main) / !--- end do not edit this --- !--- local session data stuffs setup session here...note this session supercedes the above--- !--- begin editable area here INSERT YOUR APPLICATION NAME HERE--- cfapplication name=foo sessionmanagement=Yes clientmanagement=Yes sessiontimeout=#CreateTimeSpan(0,0,20,0)# !--- do not edit this --- cfset session.user = duplicate(variables.foo) / !--- end local session data stuff --- !--- end do not edit this --- HTH DK On 9/28/05, Daniel Kessler [EMAIL PROTECTED] wrote: I only have a basic understanding of applications in CF. I have several applications in my site and each have their own logins, timeouts, and session variables. That brings up the obvious problem that someone wants to log in once and have that apply to any other login that they might come across. Currently applications have variables that are named the same but are in their own scopes. If I log in at the site level (the main page) which has it's own application.cfm and retrieve a list of applications that the user has access to, can the other applications read that there is a login at that level and then just see if they're in the application list? Am I making sense? -- 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:219591 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: query problem
[empty string] is CF's way of saying NULL, since ColdFusion has not native NULL value. Thus your where clause should be WHERE Publication_Type IS NOT NULL didn't work, but this did. Interestingly, != NULL didn't work. It had to be IS NOT NULL I never would have gotten this. I was thinking down a whole different path. Thanks alot for the help everyone. ~| 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:219592 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
query question
Morning, When I use joins with a select statement, and one of the columns in the query is blank, that record is not part of the record set. I would like to include the records with missing columns and have those columns just be blank. Is that a possibility? Thanks, Mark ~| 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:219593 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: query question
Yup. Look at left and right outer joins. http://www.w3schools.com/sql/sql_join.asp What DB are you using? Ade -Original Message- From: Mark Fuqua [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 13:45 To: CF-Talk Subject: query question Morning, When I use joins with a select statement, and one of the columns in the query is blank, that record is not part of the record set. I would like to include the records with missing columns and have those columns just be blank. Is that a possibility? Thanks, Mark ~| 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:219594 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
problem using a text list variable in a query statement
I create a list from form variables that I want to use in a query. This is where it fails to delete the records (though the query produces no error: cfset qualDelPhotoList = ListQualify(delPhotoList,',,,all) / cfquery name=qdelPhoto datasource=#request.optomDS# Delete from optomSitePhotos WHERE photoLocation IN ('#qualDelPhotoList#') /cfquery The list is: photo1.jpg,photo2.gif or 'photo1.jpg,'photo2.jpg' (depending on whether I use List Quality with the list). It doesn't seem to matter. The single quotes around #qualDelPhotoList# in the query is required or the query fails. Any ideas how to make this work? Thanks. Here is a fuller picture of the code: .cfinclude template=qry_SitePhotos.cfm!---see if there are any photos in the database to display.--- cfif session.qSitePhotosRecordcount gte 1 table width=100% tr cfif session.qSitePhotosRecordcount is 2 tdThese photos currently display with your facility's information. Click on the appropriate button(s) if you wish to remove either or both photos. cfelseif session.qSitePhotosRecordcount is 1 tdThis photo currently display with your facility's information. Click on the appropriate button if you wish to remove the photo. /cfif cfset x = 1 / cfloop query=qSitePhotos pinput type=checkbox name=delete#x# value=#qSitePhotos.photoLocation#img src=img/#qSitePhotos.photoLocation# style=width:150px;height:150px/p cfset x = x + 1 /cfloop /td /tr /table /cfif... .!---delete existing photos--- cfif Len(form.delete1) or Len(form.delete2) cfset delPhotoList = / !---try to combine values in list to send to sql query(above)--- cfif Len(form.delete1) cfset delPhotoList = listAppend(delPhotoList,#form.delete1#) / /cfif cfif Len(form.delete2) cfset delPhotoList = listAppend(delPhotoList,#form.delete2#) / /cfif cfset qualDelPhotoList = ListQualify(delPhotoList,',,,all) / cfquery name=qdelPhoto datasource=#request.optomDS# Delete from optomSitePhotos WHERE photoLocation IN ('#qualDelPhotoList#') /cfquery /cfif... ~| 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:219595 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: Scripting Window User Additions/Permissions on directories
I've never done it myself, but I ran across this blog about adding users to AD and bookmarked it just in case. Hope it helps. http://www.sargeway.com/blog/index.cfm?mode=entryentry=35 Matt Osbun Applications Manager Health Systems, International -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 6:44 AM To: CF-Talk Subject: Scripting Window User Additions/Permissions on directories Hello I'm running windows 2003 server and CFMX 7. Has anybody come across a way of adding users (Active Directory - CFLDAP?), and setting directory permissions under this configuration. Basically, i'm wanting to script addition of FTP users, and set up permissions on the necessary directories for the user i have just created.. Somebody must have done it.. :) Please share! Ryan ~| 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:219596 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: problem using a text list variable in a query statement
A nice way to debug dynamically built queries is like this: cfset qualDelPhotoList = ListQualify(delPhotoList,',,,all) / cfoutputpre !--- cfquery name=qdelPhoto datasource=#request.optomDS# --- Delete from optomSitePhotos WHERE photoLocation IN ('#qualDelPhotoList#') !--- /cfquery --- /pre/cfoutput cfabort When you run that, you'll see the query as it is passed to the DB. (Or look in the debug if it's there). Copy the generated query into Query Analyser and debug in there. Could you show us the generated SQL string? Ade -Original Message- From: Joy Holman [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 13:55 To: CF-Talk Subject: problem using a text list variable in a query statement I create a list from form variables that I want to use in a query. This is where it fails to delete the records (though the query produces no error: cfset qualDelPhotoList = ListQualify(delPhotoList,',,,all) / cfquery name=qdelPhoto datasource=#request.optomDS# Delete from optomSitePhotos WHERE photoLocation IN ('#qualDelPhotoList#') /cfquery The list is: photo1.jpg,photo2.gif or 'photo1.jpg,'photo2.jpg' (depending on whether I use List Quality with the list). It doesn't seem to matter. The single quotes around #qualDelPhotoList# in the query is required or the query fails. Any ideas how to make this work? Thanks. Here is a fuller picture of the code: ..cfinclude template=qry_SitePhotos.cfm!---see if there are any photos in the database to display.--- cfif session.qSitePhotosRecordcount gte 1 table width=100% tr cfif session.qSitePhotosRecordcount is 2 tdThese photos currently display with your facility's information. Click on the appropriate button(s) if you wish to remove either or both photos. cfelseif session.qSitePhotosRecordcount is 1 tdThis photo currently display with your facility's information. Click on the appropriate button if you wish to remove the photo. /cfif cfset x = 1 / cfloop query=qSitePhotos pinput type=checkbox name=delete#x# value=#qSitePhotos.photoLocation#img src=img/#qSitePhotos.photoLocation# style=width:150px;height:150px/p cfset x = x + 1 /cfloop /td /tr /table /cfif... ..!---delete existing photos--- cfif Len(form.delete1) or Len(form.delete2) cfset delPhotoList = / !---try to combine values in list to send to sql query(above)--- cfif Len(form.delete1) cfset delPhotoList = listAppend(delPhotoList,#form.delete1#) / /cfif cfif Len(form.delete2) cfset delPhotoList = listAppend(delPhotoList,#form.delete2#) / /cfif cfset qualDelPhotoList = ListQualify(delPhotoList,',,,all) / cfquery name=qdelPhoto datasource=#request.optomDS# Delete from optomSitePhotos WHERE photoLocation IN ('#qualDelPhotoList#') /cfquery /cfif... ~| 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:219597 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: problem using a text list variable in a query statement
Doesn't IN just work with integers, or am I remembering wrongly? Ian -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 14:03 To: CF-Talk Subject: RE: problem using a text list variable in a query statement A nice way to debug dynamically built queries is like this: cfset qualDelPhotoList = ListQualify(delPhotoList,',,,all) / cfoutputpre !--- cfquery name=qdelPhoto datasource=#request.optomDS# --- Delete from optomSitePhotos WHERE photoLocation IN ('#qualDelPhotoList#') !--- /cfquery --- /pre/cfoutput cfabort When you run that, you'll see the query as it is passed to the DB. (Or look in the debug if it's there). Copy the generated query into Query Analyser and debug in there. Could you show us the generated SQL string? Ade -Original Message- From: Joy Holman [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 13:55 To: CF-Talk Subject: problem using a text list variable in a query statement I create a list from form variables that I want to use in a query. This is where it fails to delete the records (though the query produces no error: cfset qualDelPhotoList = ListQualify(delPhotoList,',,,all) / cfquery name=qdelPhoto datasource=#request.optomDS# Delete from optomSitePhotos WHERE photoLocation IN ('#qualDelPhotoList#') /cfquery The list is: photo1.jpg,photo2.gif or 'photo1.jpg,'photo2.jpg' (depending on whether I use List Quality with the list). It doesn't seem to matter. The single quotes around #qualDelPhotoList# in the query is required or the query fails. Any ideas how to make this work? Thanks. Here is a fuller picture of the code: ..cfinclude template=qry_SitePhotos.cfm!---see if there are any photos in the database to display.--- cfif session.qSitePhotosRecordcount gte 1 table width=100% tr cfif session.qSitePhotosRecordcount is 2 tdThese photos currently display with your facility's information. Click on the appropriate button(s) if you wish to remove either or both photos. cfelseif session.qSitePhotosRecordcount is 1 tdThis photo currently display with your facility's information. Click on the appropriate button if you wish to remove the photo. /cfif cfset x = 1 / cfloop query=qSitePhotos pinput type=checkbox name=delete#x# value=#qSitePhotos.photoLocation#img src=img/#qSitePhotos.photoLocation# style=width:150px;height:150px/p cfset x = x + 1 /cfloop /td /tr /table /cfif... ..!---delete existing photos--- cfif Len(form.delete1) or Len(form.delete2) cfset delPhotoList = / !---try to combine values in list to send to sql query(above)--- cfif Len(form.delete1) cfset delPhotoList = listAppend(delPhotoList,#form.delete1#) / /cfif cfif Len(form.delete2) cfset delPhotoList = listAppend(delPhotoList,#form.delete2#) / /cfif cfset qualDelPhotoList = ListQualify(delPhotoList,',,,all) / cfquery name=qdelPhoto datasource=#request.optomDS# Delete from optomSitePhotos WHERE photoLocation IN ('#qualDelPhotoList#') /cfquery /cfif... ~| 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:219598 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: problem using a text list variable in a query statement
Delete from optomSitePhotos WHERE photoLocation IN (cfqueryparam value=#qualDelPhotoList#) Ought to do the trick. Matt Osbun Applications Manager Health Systems, International -Original Message- From: Joy Holman [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 7:55 AM To: CF-Talk Subject: problem using a text list variable in a query statement I create a list from form variables that I want to use in a query. This is where it fails to delete the records (though the query produces no error: cfset qualDelPhotoList = ListQualify(delPhotoList,',,,all) / cfquery name=qdelPhoto datasource=#request.optomDS# Delete from optomSitePhotos WHERE photoLocation IN ('#qualDelPhotoList#') /cfquery The list is: photo1.jpg,photo2.gif or 'photo1.jpg,'photo2.jpg' (depending on whether I use List Quality with the list). It doesn't seem to matter. The single quotes around #qualDelPhotoList# in the query is required or the query fails. Any ideas how to make this work? Thanks. CONFIDENTIALITY NOTICE: The information contained in this transmission, 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 by Federal law. If you are not the intended recipient of this message, you are notified that you may not disclose, print, copy, or disseminate this information. If you have received this transmission in error, please reply to the sender and delete or destroy the message. Unauthorized interception of this transmission may be a violation of criminal law. ~| 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:219599 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: problem using a text list variable in a query statement
Use this: cfset qualDelPhotoList = ListQualify(delPhotoList,',,,all) / cfquery name=qdelPhoto datasource=#request.optomDS# Delete from optomSitePhotos WHERE photoLocation IN (#preserveSingleQuotes(qualDelPhotoList)#) -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) 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:219600 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: Every once in a while, I feel smart. A story of displaying a single random image.
If you're using mySQL then you can do this: SELECT * FROM images ORDER BY RAND() LIMIT 1 Random every time. !//-- andy matthews web developer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- -Original Message- From: Jim Davis [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 28, 2005 11:56 PM To: CF-Talk Subject: RE: Every once in a while, I feel smart. A story of displaying a single random image. -Original Message- From: Taco Fleur [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 28, 2005 11:47 PM To: CF-Talk Subject: RE: Every once in a while, I feel smart. A story of displaying a single random image. Hmm, sorry to break your bubbles but both solutions are very inefficient. The best thing to do is (in MS SQL) SELECT TOP 1 * FROM yourTable ORDER BY NEWID() That will give you a random record every time and you are not transferring a whole record set over the network. Well... it's not really a random value (but close enough for practical purposes). ;^) But forgetting that I think we're both making assumptions about the usage. I was under the impression from the original poster that this random image would be displayed a lot - so using a cached query and doing what I (or the original poster) suggested would be faster by far than forcing the database to generate and sort GUIDS for every image every time you want an image. It's really the old argument of where - do you do this in CF or in the database. All the solutions presented will work - but some work better depending on how often you use them and how much you can cache. I was under the assumption that the album application would be making use of the query information quite a bit. It would probably be on hand cached some place. If that's the case it's silly to make a round trip to the database to fetch random record when you have the data already. But if the data's not be used elsewhere on the page or is not cached and you're really only doing the query for a single random image then your solution makes more sense. Jim Davis ~| 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:219601 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: query question
This database is MS Access. I don't know if it supports right joins. Is the structure of the join the same, just exchange right for left? Mark -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 8:55 AM To: CF-Talk Subject: RE: query question Yup. Look at left and right outer joins. http://www.w3schools.com/sql/sql_join.asp What DB are you using? Ade -Original Message- From: Mark Fuqua [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 13:45 To: CF-Talk Subject: query question Morning, When I use joins with a select statement, and one of the columns in the query is blank, that record is not part of the record set. I would like to include the records with missing columns and have those columns just be blank. Is that a possibility? Thanks, Mark ~| 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:219602 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: INNER JOIN
Stuart... Just FYI...it'll REALLY help with readability, both for you and for us, if you alias your tables. Like so: You simply use the AS keyword after the table name in your FROM and INNER JOIN statements. FROM tablename AS alias Or you can do it the easy way and leave off the AS keyword. FROM tablename alias. SELECT auth.authorID, auth.authorFirstName, auth.authorSurname, auth.authorPhotograph, auth.authorAboutMe, art.articleID, art.articleTitle FROM tbl_020articleDetails art INNER JOIN tbl_020authorDetails auth ON art.authorID = auth.authorID WHERE tbl_auth.authorPhotograph '' !//-- andy matthews web developer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- -Original Message- From: Saturday (Stuart Kidd) [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 4:50 AM To: CF-Talk Subject: INNER JOIN Hi, I've been having trouble with JOINS. My query below works but when i try outputting my results I am getting duplicate authors (authorID). cfquery name=GetAuthors datasource=user020 SELECT tbl_020authorDetails.authorID, tbl_020authorDetails.authorFirstName, tbl_020authorDetails.authorSurname, tbl_020authorDetails.authorPhotograph, tbl_020authorDetails.authorAboutMe, tbl_020articleDetails.articleID, tbl_020articleDetails.articleTitle FROM tbl_020articleDetails INNER JOIN tbl_020authorDetails ON tbl_020articleDetails.authorID = tbl_020authorDetails.authorID WHERE tbl_020authorDetails.authorPhotograph '' /cfquery cfoutput query=GetAuthors group=authorID cfset counter = 0 div class=contributorminibox onclick=javascript:clickarticle(this) div class=contributorphotograph img src=#PhotosWritersWeb##GetAuthors.authorPhotograph# /div div class=contributortext #authorFirstName# #authorSurname# pcfif authorAboutMe eq ''I was born in the outer reaches of the galaxy and ever since first seeing my first book had a desire to write one.cfelse#ParagraphFormat (authorAboutMe)#/cfif/p /div div class=contributorurls A list of my last articles cfoutput br / a href=http://www.020.com/webs/02005/ showArticle.cfm?id=#articleID#cfif len(articleTitle) gt 35#left (articleTitle, 35)#...cfelse#articleTitle#/cfif/a cfset counter = counter + 1 cfif counter EQ 8 /div div class=contributorurls /cfif /cfoutput /div /div div class=contributorname #authorFirstName#br /#authorSurname# /div /cfoutput I tried to make the join a RIGHT JOIN and it seemed to work but then will I add extra criteria to the WHERE i end up getting more duplicate authorIDs. Any help would be grateful, Saturday ~| 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:219603 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: query question
Use an OUTER JOIN. SELECT * FROM table01 one INNER JOIN table02 two ON one.id = two.fk_id This will only return rows from table01 that also have matching values in table02. SELECT * FROM table01 one LEFT JOIN table02 two ON one.id = two.fk_id This, however, will return ALL rows from table01 and any rows that have matching values in table02. !//-- andy matthews web developer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- -Original Message- From: Mark Fuqua [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 7:45 AM To: CF-Talk Subject: query question Morning, When I use joins with a select statement, and one of the columns in the query is blank, that record is not part of the record set. I would like to include the records with missing columns and have those columns just be blank. Is that a possibility? Thanks, Mark ~| 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:219604 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: query question
Right Mark... The join will return similar information, it just arranges it differently using a left or a right join. !//-- andy matthews web developer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- -Original Message- From: Mark Fuqua [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 8:16 AM To: CF-Talk Subject: RE: query question This database is MS Access. I don't know if it supports right joins. Is the structure of the join the same, just exchange right for left? Mark -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 8:55 AM To: CF-Talk Subject: RE: query question Yup. Look at left and right outer joins. http://www.w3schools.com/sql/sql_join.asp What DB are you using? Ade -Original Message- From: Mark Fuqua [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 13:45 To: CF-Talk Subject: query question Morning, When I use joins with a select statement, and one of the columns in the query is blank, that record is not part of the record set. I would like to include the records with missing columns and have those columns just be blank. Is that a possibility? Thanks, Mark ~| 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:219605 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
CFAjax function locaiton
This will be a double post for any of you on the Yahoo! discussion list for CFAjax, so I apologize for that. I'm using CFAjax on a project right now. It's really pretty cool, but I do have one big question for those of you who have already been using it. I have a bunch of functions which have already been stored in the request, session or application scopes. Is there any way that instead of pointing to a file for the _cfScriptLocation variable, that I can specify the location of the function as application or request or session??? If not currently possible, this would be an outstanding bit of functionality, as I'd be able to keep all my functions in my cfc's and just write them into the proper scope. Secondarily, if I've created an instance of a cfc likened to this: privObj = createObject(component, #request.componentRoot#.privilege).init(); on a page called pipeline.cfm, could I use pipeline.cfm as the _cfScriptLocation value and then just use privObj.isOperator as the function to call (assuming isOperator is a function from the privObj component)? Thanks, Ferg ~| 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:219606 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: Can CF interact with mainframe?
However, we avoid accessing it directly whenever possible. About 4 gigs of data is unloaded into flat delimited files and ftped to our SQL Server box, where it is loaded into SQL Server on a nightly basis. We do a similar process with our AS400. Although some of my CF pages do interact directly with the AS400, most of my data is pulled down to SQL every night. I do this because: 1. No one ever thought of creating indexes on the files in the AS400. Performance, on that machine, totally sucks. 2. No one uses the same datatype for related fields. For example, one ID number field may be numeric. In another file, it may be a char type. 3. The data is not very clean. We have birthdates with values like 'n092' and '1204'. I bring down only data that is considered valid. 4. There is no referential integrity. We have thousands upon thousands of orphaned records in the AS400. 5. The AS400 may be unresponsive for long periods of time. The AS400 is completely out of my control, however the SQL servers are fully in my control. I can put more trust in SQL than the AS400. There are other reasons, but those are the big ones for now. M!ke ~| 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:219607 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: Now more query problems... boo hoo
I'm managed to do the GROUP BY stuff and it's not throwing any errors but when I add the COUNT() in the order it isn't doing anything: cfquery name=GetAuthors datasource=user020 SELECT tbl_020authorDetails.authorID, tbl_020authorDetails.authorFirstName, tbl_020authorDetails.authorSurname, tbl_020authorDetails.authorPhotograph, tbl_020authorDetails.authorAboutMe, tbl_020articleDetails.articleID, tbl_020articleDetails.articleTitle FROM tbl_020articleDetails INNER JOIN tbl_020authorDetails ON tbl_020articleDetails.authorID = tbl_020authorDetails.authorID WHERE tbl_020articleDetails.articleAuthenticated = 1 AND tbl_020authorDetails.authorPhotograph '' GROUP BY tbl_020authorDetails.authorID, tbl_020authorDetails.authorFirstName, tbl_020authorDetails.authorSurname, tbl_020authorDetails.authorPhotograph, tbl_020authorDetails.authorAboutMe, tbl_020articleDetails.articleID, tbl_020articleDetails.articleTitle ORDER BY tbl_020authorDetails.authorID, COUNT (tbl_020articleDetails.articleID) DESC /cfquery cfoutput query=GetAuthors group=authorID pstrong#authorFirstName#/strong/p pmy articles:/p cfoutput#articleTitle#br //cfoutput /cfoutput Any ideas why not? It doesn't make any changes whatsoever. The ORDER BY, is that just ordering the main query, what in this case as i just want to order the JOIN (tbl_020articleDetails)? Thanks, Stuart On 29 Sep 2005, at 13:38, Taco Fleur wrote: You can use it in the order by clause, he just needs to group all the columns in his query with GROUP BY. Taco Fleur - Pacific Fox an industry leader with commercial IT experience since 1994 . http://www.pacificfox.com - Web Design and Development ~| 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:219608 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: Now more query problems... boo hoo
Hi Stuart, I'm not the world best at SQL and it helps me to build my queries in MS SQL. I keep queries running in ms sql where I can and only do it from a cfm file when absolutely necessary. Even if it needs to be done from the cfm file, I still create it in ms sql first, then copy across the sql code. Sorry I can't help with your specific problem, but I hope you find this works for you. Jenny - Original Message - From: Saturday (Stuart Kidd) [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Thursday, September 29, 2005 1:19 PM Subject: Now more query problems... boo hoo Jumping from one query problem to another... just when it was safe to to run a query another problem leapt out of the dungeons. I would like to only pull the top 8 authors who have the most articles (articleID) I have specified only to get the 8 maxrows but the problem i'm having is when i try to add to the ORDER BY COUNT(articleID) DESC My error is: [Macromedia][SQLServer JDBC Driver][SQLServer]Column 'tbl_020authorDetails.authorID' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause. It can be seen at: http://www.020.com/testsql.cfm cfquery name=GetAuthors datasource=user020 maxrows=8 SELECT tbl_020authorDetails.authorID, tbl_020authorDetails.authorFirstName, tbl_020authorDetails.authorSurname, tbl_020authorDetails.authorPhotograph, tbl_020authorDetails.authorAboutMe, tbl_020articleDetails.articleID, tbl_020articleDetails.articleTitle FROM tbl_020articleDetails INNER JOIN tbl_020authorDetails ON tbl_020articleDetails.authorID = tbl_020authorDetails.authorID WHERE tbl_020authorDetails.authorPhotograph '' AND tbl_020articleDetails.articleSubTypeID 55 ORDER BY tbl_020authorDetails.authorID, COUNT(articleID) DESC /cfquery cfoutput query=GetAuthors group=authorID pstrong#authorFirstName#/strong/p pmy articles:/p cfoutput#articleTitle#br //cfoutput /cfoutput Any help would be great. Thanks, Stuart ~| 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:219609 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: query question
Yes, just replace inner or left with right in you join statement (at least it worked in this case). MSAccess supports left right and inner join statements. Mark -Original Message- From: Mark Fuqua [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 9:16 AM To: CF-Talk Subject: RE: query question This database is MS Access. I don't know if it supports right joins. Is the structure of the join the same, just exchange right for left? Mark -Original Message- From: Adrian Lynch [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 8:55 AM To: CF-Talk Subject: RE: query question Yup. Look at left and right outer joins. http://www.w3schools.com/sql/sql_join.asp What DB are you using? Ade -Original Message- From: Mark Fuqua [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 13:45 To: CF-Talk Subject: query question Morning, When I use joins with a select statement, and one of the columns in the query is blank, that record is not part of the record set. I would like to include the records with missing columns and have those columns just be blank. Is that a possibility? Thanks, Mark ~| 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:219610 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: problem using a text list variable in a query statement
On 9/29/05, Ian Tait [EMAIL PROTECTED] wrote: Doesn't IN just work with integers, or am I remembering wrongly? you're remembering wrongly :) -- Charlie Griefer ...All the world shall be your enemy, Prince with a Thousand Enemies, and whenever they catch you, they will kill you. But first they must catch you, digger, listener, runner, prince with a swift warning. Be cunning and full of tricks and your people shall never be destroyed. ~| 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:219611 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: problem using a text list variable in a query statement
On 9/29/05, Matt Osbun [EMAIL PROTECTED] wrote: Delete from optomSitePhotos WHERE photoLocation IN (cfqueryparam value=#qualDelPhotoList#) Ought to do the trick. It will, if you add the list=yes attribute to the cfqueryparam tag. -- Charlie Griefer ...All the world shall be your enemy, Prince with a Thousand Enemies, and whenever they catch you, they will kill you. But first they must catch you, digger, listener, runner, prince with a swift warning. Be cunning and full of tricks and your people shall never be destroyed. ~| 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:219612 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: Scripting Window User Additions/Permissions on directories
Adding users is pretty easy, however, to set the password, you need an SSL connection for the CFLDAP tag. The attribute for the password is unicodePwd, I believe. I ran across this problem and then decided to create the user using a VB COM object instead. It ties me to the Windows platform, but I don't have any need to move to another platform in the distant future. I still try to use CFLDAP as much as possible, but there are cases where I have to write a simple VB COM object to do something special. For Example, Windows 2003 Active Directory lets you assign a manager to a domain group. There is a setting that allows the manager to make changes to the domain group. In this case, Microsoft did not just add an attribute that says the manager can update the members. Oh, no. They did it the hard way. When you enable that switch, AD actually adds the manager's domain account to the access control list and gives the account permission to write members. I had to write a VB COM object that loops through all permissions on the AD object just to see if the users has access to change members. This would be impossible with just CFLDAP. As far as setting the permissions on a server, you probably can do so just by running the cacls program using CFEXECUTE. Make sure your CF services are running as a domain account that has permission to create directories on the FTP server. Timing becomes an issue when you do things like this. If you have multiple domain controllers, the account is created on one of those. However, when you try to create the FTP directory and give permissions, the FTP server may be associated with a different domain controller. When you attempt to give access to the user, your script may throw an error that the user does not exist. This could be caused by the delay in syncing the two domain controllers. In this case, I would probably create the user account in real-time. Then, I would have a scheduled task that runs every 10 minutes, or so, that checks for new users, then creates their FTP directory and assigns permissions. M!ke -Original Message- From: Ryan Mitchell [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 6:44 AM To: CF-Talk Subject: Scripting Window User Additions/Permissions on directories Hello I'm running windows 2003 server and CFMX 7. Has anybody come across a way of adding users (Active Directory - CFLDAP?), and setting directory permissions under this configuration. Basically, i'm wanting to script addition of FTP users, and set up permissions on the necessary directories for the user i have just created.. Somebody must have done it.. :) Please share! Ryan ~| 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:219613 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: Can CF interact with mainframe?
Dawson, Michael wrote: We do a similar process with our AS400. Although some of my CF pages do interact directly with the AS400, most of my data is pulled down to SQL every night. I do this because: Many of the same reasons we do it. ODBC access to our mainframe (located elsewhere on campus) is considerably slower than jdbc access to SQL Server on the machine sitting next to the web server. Plus, our mainframe has a fairly large maintenance window at night where it is completely offline for several hours, and a LOT of batch jobs run at night too, making access considerably slower after hours. Most of my stuff is reporting data that is perfectly acceptable for it to be 8-16 hours old anyway. Rick ~| 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:219614 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: Can CF interact with mainframe?
We use a 3rd party product called ScreenSurfer by Inventu to do interact with our HP3000 system. -- Ian Skinner Web Programmer BloodSource www.BloodSource.org Sacramento, CA C code. C code run. Run code run. Please! - Cynthia Dunning Confidentiality Notice: This message including any attachments is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender and delete any copies of this message. ~| 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:219615 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: problem using a text list variable in a query statement
Serves me right for not double checking the docs before posting. Matt Osbun Applications Manager Health Systems, International -Original Message- From: Charlie Griefer [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 8:43 AM To: CF-Talk Subject: Re: problem using a text list variable in a query statement On 9/29/05, Matt Osbun [EMAIL PROTECTED] wrote: Delete from optomSitePhotos WHERE photoLocation IN (cfqueryparam value=#qualDelPhotoList#) Ought to do the trick. It will, if you add the list=yes attribute to the cfqueryparam tag. -- Charlie Griefer CONFIDENTIALITY NOTICE: The information contained in this transmission, 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 by Federal law. If you are not the intended recipient of this message, you are notified that you may not disclose, print, copy, or disseminate this information. If you have received this transmission in error, please reply to the sender and delete or destroy the message. Unauthorized interception of this transmission may be a violation of criminal law. ~| 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:219616 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: Every once in a while, I feel smart. A story of displaying a single random image.
Taco, Ok ... this works, but I want to know how it works. For example, if I have a table of 5000 rows, does SQL: --- SELECT TOP 1 * FROM yourTable ORDER BY NEWID() - select all the rows assign guids (newid()) order all the rows return 1 back to me? I did this query against a table with 34 records in it on a busy server - that's a pretty good test, right? select top 1 id, user_id, client_id, type from [transaction] order by newid() The execution plan shows that SQL server does: 1. Table Scan at a cost of 5% of batch to count rows and compute table size 2. Compute Guid from existing values at a cost of 0% - (DEFINE(exprXXX=newid())) 3. Sort and TOPN - sorting the batch cost of 77% (Top 1, Order by exprXXX) 4. Parallelism, gather streams (order by exprXXX) cost of 17% (this is the sort operation I presume 5. TOP - get the first N rows based on sort. There's some smart stuff going on here that prevents it from the need to create 340,000 guids. The query returned in .5 to 2 seconds in each case - not sure why the variance. That's a fairly lengthy query (as much as 2 seconds), but it is unlikely that I would find myself selected random records from a table of 30+ rows. Normally, it's only a few hundred rows - as in banner or image rotation. I do see the point of others that caching a query of a few hundred rows on the CF server and keeping the random part of the selection on the web server may in many cases be more efficient and practicaly. However, it seems to me that this a viable alternative and does not suffer from the lag time I expected - even on a very large query. Thanks for the tip. -Mark 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:219617 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: Now more query problems... boo hoo
Thanks Jenny, I'd never thought of that idea - i'll give it a go and see what i come up with. On 29 Sep 2005, at 14:41, Webmaster at FastTrack On Line wrote: Hi Stuart, I'm not the world best at SQL and it helps me to build my queries in MS SQL. I keep queries running in ms sql where I can and only do it from a cfm file when absolutely necessary. Even if it needs to be done from the cfm file, I still create it in ms sql first, then copy across the sql code. Sorry I can't help with your specific problem, but I hope you find this works for you. Jenny - Original Message - From: Saturday (Stuart Kidd) [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Thursday, September 29, 2005 1:19 PM Subject: Now more query problems... boo hoo Jumping from one query problem to another... just when it was safe to to run a query another problem leapt out of the dungeons. I would like to only pull the top 8 authors who have the most articles (articleID) I have specified only to get the 8 maxrows but the problem i'm having is when i try to add to the ORDER BY COUNT(articleID) DESC My error is: [Macromedia][SQLServer JDBC Driver][SQLServer]Column 'tbl_020authorDetails.authorID' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause. It can be seen at: http://www.020.com/testsql.cfm cfquery name=GetAuthors datasource=user020 maxrows=8 SELECT tbl_020authorDetails.authorID, tbl_020authorDetails.authorFirstName, tbl_020authorDetails.authorSurname, tbl_020authorDetails.authorPhotograph, tbl_020authorDetails.authorAboutMe, tbl_020articleDetails.articleID, tbl_020articleDetails.articleTitle FROM tbl_020articleDetails INNER JOIN tbl_020authorDetails ON tbl_020articleDetails.authorID = tbl_020authorDetails.authorID WHERE tbl_020authorDetails.authorPhotograph '' AND tbl_020articleDetails.articleSubTypeID 55 ORDER BY tbl_020authorDetails.authorID, COUNT(articleID) DESC /cfquery cfoutput query=GetAuthors group=authorID pstrong#authorFirstName#/strong/p pmy articles:/p cfoutput#articleTitle#br //cfoutput /cfoutput Any help would be great. Thanks, Stuart ~| 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:219618 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 cfselect
You can't use the selected attribute unless you are also using the query attribute in cfselect. Since you are looping over the query and outputting the option tags directly you'll need to add a cfif check. Like this cfselect name=ceilingPaint#i# option value=Select One/option cfloop query=paintList option value=#JobPaintListId# cfif JobPaintListId eq 2selected=true/cfif #PaintList.colorName#,.../option /cfloop /cfselect Hth, --nimer -Original Message- From: Mark Fuqua [mailto:[EMAIL PROTECTED] Sent: Monday, September 26, 2005 9:47 AM To: CF-Talk Subject: Help with cfselect Good Morning, I am having trouble with the selected attribute of the cfselect tag. I am trying to get it to display what is currently in the table if there is a value already there or select one if there currently is no value. I started out with the select tag, but it doesn't seem to have a similar attribute. So, I tried the cfselect. It is working as I need, except the existing value is not selected. Any help would be appreciated. Thanks, Mark Here is the code on my page: cfquery name=areaPaints datasource=mdfinish SELECT AreaId, AreaName, WallPaint, TrimPaint, CeilingPaint FROM Areas WHERE areas.JobId = #session.JobId# /cfquery cfquery name=paintList datasource=mdfinish SELECT JobPaintList.color, JobPaintList.JobPaintListId, JobPaintList.CustomColorName, PaintColor.ColorName, PaintColor.colorNumber, JobPaintList.line, JobPaintList.sheen, JobPaintList.manufacturer, PaintLines.PaintLineName, PaintSheen.PaintSheen FROM PaintSheen INNER JOIN (PaintLines INNER JOIN (PaintColor INNER JOIN JobPaintList ON PaintColor.ID = JobPaintList.color) ON PaintLines.PaintLineId = JobPaintList.line) ON PaintSheen.PaintSheenId = JobPaintList.sheen WHERE JobPaintList.job = #session.jobId# /cfquery cfmodule template=#Request.layout#/Header.cfm pageType=JobAdmin cfset i=1 cfform name=setcolor action=paintScheduleSetColorsAction.cfm table width=100% tr thArea Name/th thWall Paint/th thCeiling Paint/th thTrim Paint/th /tr cfoutput cfloop query=areaPaints trcfset i = i + 1 td#areaName#/td td cfselect name=wallPaint#i# option value=Select One/option cfloop query=paintList option value=#JobPaintListId##PaintList.colorName#, #Paintlist.ColorNumber# #PaintList.PaintLineName# #PaintList.PaintSheen# #PaintList.CustomColorName#/option /cfloop /cfselect /td td cfselect name=ceilingPaint#i# selected=#areaPaints.ceilingPaint# option value=Select One/option cfloop query=paintList option value=#JobPaintListId##PaintList.colorName#, #Paintlist.ColorNumber# #PaintList.PaintLineName# #PaintList.PaintSheen# #PaintList.CustomColorName#/option /cfloop /cfselectnbsp;/td td cfselect name=trimPaint#i# option value=Select One/option cfloop query=paintList option value=#JobPaintListId##PaintList.colorName#, #Paintlist.ColorNumber# #PaintList.PaintLineName# #PaintList.PaintSheen# #PaintList.CustomColorName#/option /cfloop /cfselectnbsp;/td /tr /cfloop /cfoutput tr td /tr /table button type=submitsubmit/button /cfform cfmodule template=#Request.layout#/Footer.cfmcfmodule template=#Request.layout#/Footer.cfm ~| 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:219619 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: Now more query problems... boo hoo
Correct Ade :-) The way around it I use is to run a second query against the first query. Jenny - Original Message - From: Adrian Lynch [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Thursday, September 29, 2005 1:30 PM Subject: RE: Now more query problems... boo hoo You can't use COUNT in the ORDER BY clause. (Please someone back me up here else I'm off to spend some time with Book Online!). Ade -Original Message- From: Saturday (Stuart Kidd) [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 13:20 To: CF-Talk Subject: Now more query problems... boo hoo Jumping from one query problem to another... just when it was safe to to run a query another problem leapt out of the dungeons. I would like to only pull the top 8 authors who have the most articles (articleID) I have specified only to get the 8 maxrows but the problem i'm having is when i try to add to the ORDER BY COUNT(articleID) DESC My error is: [Macromedia][SQLServer JDBC Driver][SQLServer]Column 'tbl_020authorDetails.authorID' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause. It can be seen at: http://www.020.com/testsql.cfm cfquery name=GetAuthors datasource=user020 maxrows=8 SELECT tbl_020authorDetails.authorID, tbl_020authorDetails.authorFirstName, tbl_020authorDetails.authorSurname, tbl_020authorDetails.authorPhotograph, tbl_020authorDetails.authorAboutMe, tbl_020articleDetails.articleID, tbl_020articleDetails.articleTitle FROM tbl_020articleDetails INNER JOIN tbl_020authorDetails ON tbl_020articleDetails.authorID = tbl_020authorDetails.authorID WHERE tbl_020authorDetails.authorPhotograph '' AND tbl_020articleDetails.articleSubTypeID 55 ORDER BY tbl_020authorDetails.authorID, COUNT(articleID) DESC /cfquery cfoutput query=GetAuthors group=authorID pstrong#authorFirstName#/strong/p pmy articles:/p cfoutput#articleTitle#br //cfoutput /cfoutput Any help would be great. Thanks, Stuart ~| 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:219620 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: query question
if you are using ms sql to build the query, right click the joining line in the query builder and select to return all rows in the relevant table, this does the appropriate join for you. Jenny - Original Message - From: Adrian Lynch [EMAIL PROTECTED] To: CF-Talk cf-talk@houseoffusion.com Sent: Thursday, September 29, 2005 1:55 PM Subject: RE: query question Yup. Look at left and right outer joins. http://www.w3schools.com/sql/sql_join.asp What DB are you using? Ade -Original Message- From: Mark Fuqua [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 13:45 To: CF-Talk Subject: query question Morning, When I use joins with a select statement, and one of the columns in the query is blank, that record is not part of the record set. I would like to include the records with missing columns and have those columns just be blank. Is that a possibility? Thanks, Mark ~| 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:219621 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: Idea for better hosting
Damn your insulting Emmett, Did you read my initial post? It would be a nice dreamworld if people read carefully. Have a nice day. DRE On 9/29/05, Snake [EMAIL PROTECTED] wrote: Yes you can. The Web Edition is a web server, thus the name. So it wont let you run certain other MS products such as SQL Server which require Windows 2003 Server std. But it cannot stop installing any 3rd party product. Russ -Original Message- From: Joel Nath [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 08:45 To: CF-Talk Subject: RE: Idea for better hosting Hi, can you run CFMX on Windows Server 2003, Web Edition i was told you cant, that it doesnt support it ? -Original Message- From: Emmet McGovern [mailto:[EMAIL PROTECTED] Sent: Thursday, 29 September 2005 12:08 PM To: CF-Talk Subject: RE: Idea for better hosting The original post is set in some bizarre dream world. Clustering bad code just means bad code running on 3 servers. Let's look at the costs anyway. We'll cut corners when we can and look at sticky sessions on standard cf licenses too. ---WINDOWS--- Servers x 3 $4200 - $6600 Windows Server 2003, Standard Edition x3 $2,997 CF Enterprise x3 $17,997 --- TOTAL: $25,194 - $27,594 Servers x 3 $4200 - $6600 Windows Server 2003, Web Edition x3 $1,200 CF Standard x3 $3,897 --- TOTAL: $9,297 - $11,697 ---LINUX--- Servers x 3 $4200 - $6600 Redhat Linux ES x3 $1,047 CF Enterprise x3 $17,997 --- TOTAL: $23,244 - $25,644 Servers x 3 $4200 - $6600 FEDORA x3 $FREE CF Standard x3 $3,897 --- TOTAL: $8,097 - $10,497 So you can budget for $8,097 - $27,594 With 400 clients at $15-$30 a month you get $6,000 - $12,000 a month. I'm frickin RICH BIATCH! Lease me a BMW! except... Now you need a way to load balance. Hardware - $3000-$1 Software NLB - $FREE Damn... Your rack is filling up fast. $1200-2000 per month per rack. Holy crap! We're out of room on the switch again. $600 File replication shut down again. Wheres Larry the tech? - $30-$80k salary $%#! CRC errors on the NLB!!! Where's Larry's brother Larry? $30-$80k yr Sally from Sallysellsseashells.com http://Sallysellsseashells.com can't get her mail. Support - $24-$35 yr These expenses are killing us. Where's Rich the sales guy? - $24k base YAY!!! Were growing! We need to hire some more people. Shit. I just missed the lease payment on my BMW. DAMN YOU COLDFUSION Takin the bus to the office (if I could afford the office), Emmet ~| 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:219622 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 cfselect
You can't use the selected attribute unless you are also using the query attribute in cfselect. Since you are looping over the query and outputting the option tags directly you'll need to add a cfif check. Like this cfselect name=ceilingPaint#i# option value=Select One/option cfloop query=paintList option value=#JobPaintListId# cfif JobPaintListId eq 2selected=true/cfif #PaintList.colorName#,.../option /cfloop /cfselect Hth, --nimer ~| 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:219623 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
Query with multiple criteria
Here's a problem that I run into a lot and have never come up with a good answer for... When building a search form that allows to search multiple criteria in a table(s) - lets say lname, category, and color for this example - the user can fill in any one of these, or all of them. So, when building the query, I always have trouble figuring out what the first item in the WHERE statement is, because you don't know which field above might or might not be filled in. So, if they fill in just category and color - see the problem? What's best practice for this? cfquery name=myQuery Select * From Table Where ??? cfif IsDefined(form.lname) and lname like '%#form.lname#%' /cfif cfif IsDefined(form.category) and lname like '%#form.category#%' /cfif cfif IsDefined(form.color) and lname like '%#form.color#%' /cfif /cfquery The form I'm working on have close to 30 possible fields, and spans several tables... ~| 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:219624 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: Query with multiple criteria
cfquery name=myQuery Select * From Table Where 1=1 cfif IsDefined(form.lname) and lname like '%#form.lname#%' /cfif cfif IsDefined(form.category) and lname like '%#form.category#%' /cfif cfif IsDefined(form.color) and lname like '%#form.color#%' /cfif /cfquery -Original Message- From: Les Mizzell [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 15:42 To: CF-Talk Subject: Query with multiple criteria Here's a problem that I run into a lot and have never come up with a good answer for... When building a search form that allows to search multiple criteria in a table(s) - lets say lname, category, and color for this example - the user can fill in any one of these, or all of them. So, when building the query, I always have trouble figuring out what the first item in the WHERE statement is, because you don't know which field above might or might not be filled in. So, if they fill in just category and color - see the problem? What's best practice for this? cfquery name=myQuery Select * From Table Where ??? cfif IsDefined(form.lname) and lname like '%#form.lname#%' /cfif cfif IsDefined(form.category) and lname like '%#form.category#%' /cfif cfif IsDefined(form.color) and lname like '%#form.color#%' /cfif /cfquery The form I'm working on have close to 30 possible fields, and spans several tables... ~| 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:219625 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: Query with multiple criteria
Try WHERE 1 = 1 Ade -Original Message- From: Les Mizzell [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 15:42 To: CF-Talk Subject: Query with multiple criteria Here's a problem that I run into a lot and have never come up with a good answer for... When building a search form that allows to search multiple criteria in a table(s) - lets say lname, category, and color for this example - the user can fill in any one of these, or all of them. So, when building the query, I always have trouble figuring out what the first item in the WHERE statement is, because you don't know which field above might or might not be filled in. So, if they fill in just category and color - see the problem? What's best practice for this? cfquery name=myQuery Select * From Table Where ??? cfif IsDefined(form.lname) and lname like '%#form.lname#%' /cfif cfif IsDefined(form.category) and lname like '%#form.category#%' /cfif cfif IsDefined(form.color) and lname like '%#form.color#%' /cfif /cfquery The form I'm working on have close to 30 possible fields, and spans several tables... ~| 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:219626 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: Idea for better hosting
In my dreamworld, I suddenly realized that perhaps someone has already thought of this. So I searched for load balanced hosting and found 588000 results. Oops emmett, this bizzare dreamworld seems to occur in your world. .. . DRE On 9/29/05, DRE [EMAIL PROTECTED] wrote: Damn your insulting Emmett, Did you read my initial post? It would be a nice dreamworld if people read carefully. Have a nice day. DRE ~| 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:219627 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
query using - and + to designate MUST HAVE
I have an Oracle query that I'm trying to get it to work like a google search. I have a list of words that it can contain (search_ar) and a list of words that it must contain (search_must) designated by a +. It will also have a MUST NOT CONTAIN, which will be designated by a -. So when I do the search research analysis, it gives me 49 hits. When I do research analysis +taag, it gives me the same 49, even though I know that only 2 of the 49 have the word taag in it. I figured that it would give me 2 hits and that this is a bracketing issue for the query and I suppose it might still be, but I don't see it. How would I write the query to do what I think is correct. Also, that's how it should work right (if it were google-like)? WHERE cfloop from=1 to=#arrayLen(search_ar)# index=ii UPPER(#PreserveSingleQuotes(the_search_column)#) LIKE UPPER('%#search_ar[ii]#%') cfif ii LT arrayLen(search_ar)OR/cfif /cfloop cfif arrayLen(search_ar) GT 0 AND arrayLen(search_must) GT 0AND/cfif cfif arrayLen(search_must) GT 0 ( cfloop from=1 to=#arrayLen(search_must)# index=jj UPPER(#PreserveSingleQuotes(the_search_column)#) LIKE UPPER('%#search_must[jj]#%') cfif jj LT arrayLen(search_must)AND/cfif /cfloop ) /cfif 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 ~| 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:219628 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
ways to cache a query other than 'cachedwithin'
I've got a simple query that will grab all my navigational menu items. pretty simple. Now, I've added Mike D's cf_maketree script to modify the query by adding another field, called maketreesortlevel, that stores the tree level so that I can output the menu items in the correct order and depth. this query gets rather big, since I've got over 1300 categories and subcategories, so I'd like to be able to cache it. i know how to use cachedwithin as a cfquery attribute, but this won't work here, since I am modifying that query. is there another way to cache a query? here's the code, if it helps: cfif NOT isdefined(qry_get_topcats) or isdefined(attributes.refresh) cfquery name=qry_get_topcats datasource=#Request.DS# username=#Request.user# password=#Request.pass# cachedwithin=#Request.Cache# SELECT Category_ID, Name, Parent_ID, ParentIDs FROM Categories WHERE Categories.Display = 1 ORDER BY Priority, Name /cfquery !--- this script modifies the query to add 'maketreesortlevel' --- cfmodule template=make_tree.cfm Query=#qry_get_topcats# Result=qry_get_topcats Unique=category_ID Parent=Parent_ID /cfif TY Ray -- = Ray Champagne - Senior Application Developer CrystalVision Web Site Design and Internet Services 603.433.9559 www.crystalvision.org = ~| 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:219629 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: ways to cache a query other than 'cachedwithin'
Make a persisted CFC and put the query in it at a variables scope variable. As long as the CFC is persisted, the query is persisted. MUCH cleaner than cachedwithin/cachedafter. I have an article on it waiting to go which I can send you off list (it's pre-edit) I've got a simple query that will grab all my navigational menu items. pretty simple. Now, I've added Mike D's cf_maketree script to modify the query by adding another field, called maketreesortlevel, that stores the tree level so that I can output the menu items in the correct order and depth. this query gets rather big, since I've got over 1300 categories and subcategories, so I'd like to be able to cache it. i know how to use cachedwithin as a cfquery attribute, but this won't work here, since I am modifying that query. is there another way to cache a query? here's the code, if it helps: cfif NOT isdefined(qry_get_topcats) or isdefined(attributes.refresh) cfquery name=qry_get_topcats datasource=#Request.DS# username=#Request.user# password=#Request.pass# cachedwithin=#Request.Cache# SELECT Category_ID, Name, Parent_ID, ParentIDs FROM Categories WHERE Categories.Display = 1 ORDER BY Priority, Name /cfquery !--- this script modifies the query to add 'maketreesortlevel' --- cfmodule template=make_tree.cfm Query=#qry_get_topcats# Result=qry_get_topcats Unique=category_ID Parent=Parent_ID /cfif TY Ray -- = Ray Champagne - Senior Application Developer CrystalVision Web Site Design and Internet Services 603.433.9559 www.crystalvision.org = ~| 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:219630 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: ways to cache a query other than 'cachedwithin'
Ray, You could store the query in the application scope. Robert -Original Message- From: Ray Champagne [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 10:27 AM To: CF-Talk Subject: ways to cache a query other than 'cachedwithin' I've got a simple query that will grab all my navigational menu items. pretty simple. Now, I've added Mike D's cf_maketree script to modify the query by adding another field, called maketreesortlevel, that stores the tree level so that I can output the menu items in the correct order and depth. this query gets rather big, since I've got over 1300 categories and subcategories, so I'd like to be able to cache it. i know how to use cachedwithin as a cfquery attribute, but this won't work here, since I am modifying that query. is there another way to cache a query? here's the code, if it helps: cfif NOT isdefined(qry_get_topcats) or isdefined(attributes.refresh) cfquery name=qry_get_topcats datasource=#Request.DS# username=#Request.user# password=#Request.pass# cachedwithin=#Request.Cache# SELECT Category_ID, Name, Parent_ID, ParentIDs FROM Categories WHERE Categories.Display = 1 ORDER BY Priority, Name /cfquery !--- this script modifies the query to add 'maketreesortlevel' --- cfmodule template=make_tree.cfm Query=#qry_get_topcats# Result=qry_get_topcats Unique=category_ID Parent=Parent_ID /cfif TY Ray -- = Ray Champagne - Senior Application Developer CrystalVision Web Site Design and Internet Services 603.433.9559 www.crystalvision.org = ~| 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:219631 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: ways to cache a query other than 'cachedwithin'
Hey, thanks Mike, I'd love to see the unedited version. CFC's are new to me, but I've been looking for an excuse to jump in with both feet! You can send it to this address. Ray Michael Dinowitz wrote: Make a persisted CFC and put the query in it at a variables scope variable. As long as the CFC is persisted, the query is persisted. MUCH cleaner than cachedwithin/cachedafter. I have an article on it waiting to go which I can send you off list (it's pre-edit) I've got a simple query that will grab all my navigational menu items. pretty simple. Now, I've added Mike D's cf_maketree script to modify the query by adding another field, called maketreesortlevel, that stores the tree level so that I can output the menu items in the correct order and depth. this query gets rather big, since I've got over 1300 categories and subcategories, so I'd like to be able to cache it. i know how to use cachedwithin as a cfquery attribute, but this won't work here, since I am modifying that query. is there another way to cache a query? here's the code, if it helps: cfif NOT isdefined(qry_get_topcats) or isdefined(attributes.refresh) cfquery name=qry_get_topcats datasource=#Request.DS# username=#Request.user# password=#Request.pass# cachedwithin=#Request.Cache# SELECT Category_ID, Name, Parent_ID, ParentIDs FROM Categories WHERE Categories.Display = 1 ORDER BY Priority, Name /cfquery !--- this script modifies the query to add 'maketreesortlevel' --- cfmodule template=make_tree.cfm Query=#qry_get_topcats# Result=qry_get_topcats Unique=category_ID Parent=Parent_ID /cfif TY Ray -- = Ray Champagne - Senior Application Developer CrystalVision Web Site Design and Internet Services 603.433.9559 www.crystalvision.org = ~| 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:219632 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: ways to cache a query other than 'cachedwithin'
-Original Message- From: Ray Champagne [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 11:27 AM To: CF-Talk Subject: ways to cache a query other than 'cachedwithin' I've got a simple query that will grab all my navigational menu items. pretty simple. Now, I've added Mike D's cf_maketree script to modify the query by adding another field, called maketreesortlevel, that stores the tree level so that I can output the menu items in the correct order and depth. this query gets rather big, since I've got over 1300 categories and subcategories, so I'd like to be able to cache it. i know how to use cachedwithin as a cfquery attribute, but this won't work here, since I am modifying that query. is there another way to cache a query? here's the code, if it helps: I think there might be some confusion here... you're cfif statement isn't doing what I think you think its doing. ;^) When you cache a query using cachedwithin it caches the query results keyed to the SQL statement (and information about it like user and password) - it doesn't cache the VARIABLE you're using however. Essentially if you run that EXACT SQL again you'll get the cached results. In your case this line: cfif NOT isdefined(qry_get_topcats) or isdefined(attributes.refresh) Doesn't do what you think it does. The variable qry_get_topcats is a local (variables scoped) variable and so is created at the beginning of a request and destroyed at the end - this line will never prevent the code from being run (unless it's call twice in the same request... if it were in an include for example). The variable qry_get_topcats is not cached. The SQL Statement you made (SELECT Catefory_ID...) is linked to the cached data. As it is I think your CFModule call will be run every-single request. Now... as to the actual problem. I'm going to throw out an idea, but I don't know if it'll work. It should be easy to try tho'. The query itself is cached by CF (and linked to the SQL Statement). But it can still be modified (as you see when you run your CFModule call). So, instead of checking for the query, check for your changes. The first time the query is run it's cached. But the maketreesortlevel column doesn't exist, your CFModule adds that. If the query is pulled from cache it will not change. However once the query is rerun it will be fresh again (no maketreesortlevel column). So something like this might work (I've abbreviated some of the code): cfquery name=qry_get_topcats ... cachedwithin=#Request.Cache# SELECT Category_ID, Name, Parent_ID, ParentIDs FROM Categories WHERE Categories.Display = 1 ORDER BY Priority, Name /cfquery cfif NOT IsDefined(qry_get_topcats.maketreesortlevel) cfmodule template=make_tree.cfm Query=#qry_get_topcats# Result=qry_get_topcats Unique=category_ID Parent=Parent_ID /cfif This caches the query. Running the same SQL Statement again will NOT result in a database hit until the cache timeout occurs. However the next block checks for your modifications - if it doesn't find them it adds them. Now - finally, to reset the query when you want... I believe (but I may be wrong) that calling the query with a cachedwithin of zero should effectively reset it. I think this might also result in two calls to the query however (one to reset it, another to recache it). Somebody else probably has a cleaner solution... but it would be something like this: cfif IsDefined(attributes.refresh) cfquery name=qry_get_topcats ... cachedwithin=0 SELECT Category_ID, Name, Parent_ID, ParentIDs FROM Categories WHERE Categories.Display = 1 ORDER BY Priority, Name /cfquery cfelse cfquery name=qry_get_topcats ... cachedwithin=#Request.Cache# SELECT Category_ID, Name, Parent_ID, ParentIDs FROM Categories WHERE Categories.Display = 1 ORDER BY Priority, Name /cfquery /cfif cfif NOT IsDefined(qry_get_topcats.maketreesortlevel) cfmodule template=make_tree.cfm Query=#qry_get_topcats# Result=qry_get_topcats Unique=category_ID Parent=Parent_ID /cfif I hope this helps, Jim Davis ~| 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:219633 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
CFComplie, problems, or gotcha, or just me?
OK so I'm playing around with CFCompile because a customer wants root level access to his site and we don't want him to see proprietary code for our CMS. I compiled our CFC directory as a test and replaced the uncompiled files with the compiled files. Everything seems to work fine. Then on a whim to test that it was reading correctly i removed one of the CFC's (just moved it from the CFC folder to the root folder) and hit the page again. Got the expected error (Component blah.blah.blah not found yada yada yada) BUT when i copied the file BACK to the CFC directory it STILL wouldn't find it. SO i recompiled the entire CFC directory again and copied all the compiled files again and it works again. ANY idea why when i move a compiled CFC from one directory to another and then back to it's original directory it would fail?? Also when it asks for the webroot should this be the webroot of the server, or of the particular website I'm cfcompiling on? (we virtually host our clients on the same box) TIA jonese ~| 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:219634 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: ways to cache a query other than 'cachedwithin'
-Original Message- From: Jim Davis [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 12:05 PM To: CF-Talk Subject: RE: ways to cache a query other than 'cachedwithin' I think there might be some confusion here... you're cfif statement isn't doing what I think you think its doing. ;^) When you cache a query using cachedwithin it caches the query results keyed to the SQL statement (and information about it like user and password) - it doesn't cache the VARIABLE you're using however. Essentially if you run that EXACT SQL again you'll get the cached results. Now I'm not so sure about that... but I think I'm still right. The queryname is definitely used as part of the key to the cached data... but since it's not in a permanent scope I don't see how it could be available to be checked (using IsDefined()) until the query is run. I think this needs some testing... Jim Davis ~| 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:219635 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
Multiple CFGRIDs
I'm having a play with flash forms today, and using the new Flash CFGRID. Is it not possible to have multiple CFGRIDS on a page, cozz I am getting very strange results. Every instance of the cfgrid is repeating the columns again. So in instance 1 I get 2 columns fields,data, in instance 2 I get 4 columns fields,data,fields,data and so on and so on. Plus each instance has exactly the same rows of data, which it shouldn't do. Here is the code. Each cfgrid has a unique name, so I can't see why this is happening. cfoutput query=components group=componentID fieldsetlegend#component#/legend cfgrid name=C#componentID# height=150 width=100% format=FLASH insert=No delete=No sort=Yes font=Arial bold=No italic=No autowidth=true appendkey=No highlighthref=No enabled=Yes visible=Yes griddataalign=LEFT gridlines=Yes rowheaders=No rowheaderalign=LEFT rowheaderitalic=No rowheaderbold=No colheaders=No colheaderalign=LEFT colheaderitalic=No colheaderbold=No selectmode=EDIT picturebar=No cfgridcolumn name=fieldID headeralign=LEFT dataalign=LEFT bold=No italic=No select=No display=No type=NUMERIC headerbold=No headeritalic=No cfgridcolumn name=fieldName header=Field Name headeralign=LEFT dataalign=LEFT bold=No italic=No select=No display=Yes type=STRING_NOCASE headerbold=No headeritalic=No cfgridcolumn name=data headeralign=LEFT dataalign=LEFT bold=No italic=No select=Yes display=Yes type=NUMERIC headerbold=No headeritalic=No cfoutput cfgridrow data=#fieldID#,#fieldName#,#data# /cfoutput /cfgrid /fieldset /cfoutput -- Russ ~| 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:219636 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: Idea for better hosting
I wasn't trying to insult you. Sorry if that I did. It was a lighthearted explanation of why that will never happen, at least not in the shared environment. We have several clustered CF enterprise setups. They add a whole new level of difficulty to management and maintenance. The additional cost in support greatly increases the cost of provisioning above hardware and licensing. For now VPS is as close as anyone will get to affordability and isolated stability. Unfortunately, I'm sure that will change once licensing catches up. Emmet -Original Message- From: DRE [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 10:43 AM To: CF-Talk Subject: Re: Idea for better hosting Damn your insulting Emmett, Did you read my initial post? It would be a nice dreamworld if people read carefully. Have a nice day. DRE On 9/29/05, Snake [EMAIL PROTECTED] wrote: Yes you can. The Web Edition is a web server, thus the name. So it wont let you run certain other MS products such as SQL Server which require Windows 2003 Server std. But it cannot stop installing any 3rd party product. Russ -Original Message- From: Joel Nath [mailto:[EMAIL PROTECTED] Sent: 29 September 2005 08:45 To: CF-Talk Subject: RE: Idea for better hosting Hi, can you run CFMX on Windows Server 2003, Web Edition i was told you cant, that it doesnt support it ? -Original Message- From: Emmet McGovern [mailto:[EMAIL PROTECTED] Sent: Thursday, 29 September 2005 12:08 PM To: CF-Talk Subject: RE: Idea for better hosting The original post is set in some bizarre dream world. Clustering bad code just means bad code running on 3 servers. Let's look at the costs anyway. We'll cut corners when we can and look at sticky sessions on standard cf licenses too. ---WINDOWS--- Servers x 3 $4200 - $6600 Windows Server 2003, Standard Edition x3 $2,997 CF Enterprise x3 $17,997 --- TOTAL: $25,194 - $27,594 Servers x 3 $4200 - $6600 Windows Server 2003, Web Edition x3 $1,200 CF Standard x3 $3,897 --- TOTAL: $9,297 - $11,697 ---LINUX--- Servers x 3 $4200 - $6600 Redhat Linux ES x3 $1,047 CF Enterprise x3 $17,997 --- TOTAL: $23,244 - $25,644 Servers x 3 $4200 - $6600 FEDORA x3 $FREE CF Standard x3 $3,897 --- TOTAL: $8,097 - $10,497 So you can budget for $8,097 - $27,594 With 400 clients at $15-$30 a month you get $6,000 - $12,000 a month. I'm frickin RICH BIATCH! Lease me a BMW! except... Now you need a way to load balance. Hardware - $3000-$1 Software NLB - $FREE Damn... Your rack is filling up fast. $1200-2000 per month per rack. Holy crap! We're out of room on the switch again. $600 File replication shut down again. Wheres Larry the tech? - $30-$80k salary $%#! CRC errors on the NLB!!! Where's Larry's brother Larry? $30-$80k yr Sally from Sallysellsseashells.com http://Sallysellsseashells.com can't get her mail. Support - $24-$35 yr These expenses are killing us. Where's Rich the sales guy? - $24k base YAY!!! Were growing! We need to hire some more people. Shit. I just missed the lease payment on my BMW. DAMN YOU COLDFUSION Takin the bus to the office (if I could afford the office), Emmet ~| 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:219637 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: ways to cache a query other than 'cachedwithin'
Thanks Jim. This is some good insight. I am trying out some tests right now, I'll let you know what the results are in a little bit. Jim Davis wrote: -Original Message- From: Jim Davis [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 12:05 PM To: CF-Talk Subject: RE: ways to cache a query other than 'cachedwithin' I think there might be some confusion here... you're cfif statement isn't doing what I think you think its doing. ;^) When you cache a query using cachedwithin it caches the query results keyed to the SQL statement (and information about it like user and password) - it doesn't cache the VARIABLE you're using however. Essentially if you run that EXACT SQL again you'll get the cached results. Now I'm not so sure about that... but I think I'm still right. The queryname is definitely used as part of the key to the cached data... but since it's not in a permanent scope I don't see how it could be available to be checked (using IsDefined()) until the query is run. I think this needs some testing... Jim Davis ~| 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:219638 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: restricting cfoutput character length
There are also a lot of great UDF's available for problems like this at http://www.cflib.org -e -Original Message- From: Scott Weikert [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 2:11 AM To: CF-Talk Subject: Re: restricting cfoutput character length Saturday (Stuart Kidd) wrote: Hi, I'm trying to do something which i can imagine is very simple but can't find the function. When i display a title cfoutput#myTitle#/cfoutput i'd like to just display the first 15 characters and if more then put three dots (periods). I know the LEN function but i can't work out how to replace the text with dots after the 15th character. #IIF(Len(fieldname) GT 15, DE(Left(fieldname, 15) ...), DE(fieldname))# ~| 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:219639 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
cache query error -- cf server crashes
Here's an interesting one for anyone bored or obviously more 'in-the-know' than i. Background: We have site that gets a fair amount of activity (700,000 - 1.5 mil page views a day). It's a data providing website for subscribers of the service. About 4 months ago, we started caching a query on the most active page on the website. We did this because the database servers were under extremely high load. We use the cfquery attribute cachedWithin to cache this query for 3 minutes. The cached query, while storing a lot of rows, is only storing PK IDs to the actual data -- the data itself is pulled out in other queries in smaller chunks. So for instance, the cached query may return 5,000 rows, but we break that into pages of 50 and only pull out data for the 50 that belong to the page # the user is browsing. This seems to work great. It certainly sped up the system, significantly, and took a load off the database servers. The Problem: This has happened a few times in the past but always went away for long periods -- but now is happening multiple times a day (i'd say about 5 to 10 times a day)... Our cached query has a name of results_all_cached. Something happens, during one of these f-ups, that causes CF to throw the error: results_all_cached is undefined. Even though it is clearly defined right above where it's trying to be used (example: cfquery runs cached query, and the very next line in the code after the query tries to use the result set and it gets the error about it being undefined). This error continues to be thrown until the 3 minute timespan has passed (defined in the cachedWithin attribute). Once that time is up, the event log in Windows shows an Application error of The ColdFusion MX Application Server service killed process with pid followed by The ColdFusion MX Application Server service for the default server was stopped and The ColdFusion MX Application Server service for the default server was started. PID is xxx. Because the problem has worsened, we have implemented a try/catch block to catch these errors and log them. After it logs the error, it simply runs the query against the live database instead of cache. Since doing this, the errors still occur but CF doesn't restart itself -- and just as always, after 3 minutes, the cache query starts working again. ?? System Info: Windows Server 2003 Coldfusion MX 6.1 Database (if it matters): SQL Server 2000 running on Windows Server 2003 Trusted Cache is on Max number of cached queries is set to 200 Min JVM heap size set to 512MB Max JVM heap size set to 768MB Code: line# 397cfquery datasource=#datasource# name=results_all_cached cachedWithin=#createtimespan(0, 0, 3, 0)# line# 398-498 *query intentionally removed line# 499/cfquery line# 500 line# 501 cfset results_all = results_all_cached (if youre curious, the reason line 501 exists, is results_all_cached data is really getting used far below that, when its outputted to the page, and when we used to get these errors we had no idea what was going on so we though that maybe if we set results_all_cached as a local var in the page right after the query the problem would go away. it didnt, now the error just happens on line 501 instead of further down) Exact Error: *Message:* Variable RESULTS_ALL_CACHED is undefined. *Root Cause:* coldfusion.runtime.UndefinedVariableException: Variable RESULTS_ALL_CACHED is undefined. *Diagnostics:* Variable RESULTS_ALL_CACHED is undefined. The error occurred on line 501. *Stack Trace:* coldfusion.runtime.UndefinedVariableException: Variable RESULTS_ALL_CACHED is undefined. at coldfusion.runtime.CfJspPage._get(CfJspPage.java:216) at coldfusion.runtime.CfJspPage._autoscalarize(CfJspPage.java:916) at cf_index2ecfm2092971655._factor15(D:\*intentionally removed path*:501) at cf_index2ecfm2092971655.runPage(D:\*intentionally removed path*:1) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:147) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:357) at coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.java:1876) at cfindex2ecfm240649404.runPage(D:\*intentionally removed path*:10) at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:147) at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:357) at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:62) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:107) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48) at coldfusion.filter.PathFilter.invoke(PathFilter.java:80) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:47) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at
RE: ways to cache a query other than 'cachedwithin'
-Original Message- From: Jim Davis [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 12:12 PM To: CF-Talk Subject: RE: ways to cache a query other than 'cachedwithin' Now I'm not so sure about that... but I think I'm still right. The queryname is definitely used as part of the key to the cached data... but since it's not in a permanent scope I don't see how it could be available to be checked (using IsDefined()) until the query is run. I think this needs some testing... Do some testing... I think I'm correct. Run the following code (but change the query to actually work on your system): cfif IsDefined(MyQuery) Is Defined! cfelse Is NOT Defined! /cfif cfquerydatasource=... name=MyQuery cachedwithin=1 result=MyQueryInfo SELECT ... /cfquery cfdump var=#MyQueryInfo# The first time you run it you'll see that MyQuery is not defined. The Query metadata will show that in this instance it's not been cached. The second time you run it you'll see that MyQuery is still not defined... but the metadata will show that the query was retrieved from cache. Hope this helps, Jim Davis ~| 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:219641 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
CF Tips... was CF smart
We need a Wiki or something to start compiling all the nifty solutions here. Is anyone on the Evolt.org list? They have a nice self building tips library by posters who just surround things with tip/tip. It would be interesting to build a cflist parser that throws something like this into an rss feed. Then the community could offer a tip to the feed here and there. Or not. -e -Original Message- From: Mark A Kruger [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 10:29 AM To: CF-Talk Subject: RE: Every once in a while, I feel smart. A story of displaying a single random image. Taco, Ok ... this works, but I want to know how it works. For example, if I have a table of 5000 rows, does SQL: --- SELECT TOP 1 * FROM yourTable ORDER BY NEWID() - select all the rows assign guids (newid()) order all the rows return 1 back to me? I did this query against a table with 34 records in it on a busy server - that's a pretty good test, right? select top 1 id, user_id, client_id, type from [transaction] order by newid() The execution plan shows that SQL server does: 1. Table Scan at a cost of 5% of batch to count rows and compute table size 2. Compute Guid from existing values at a cost of 0% - (DEFINE(exprXXX=newid())) 3. Sort and TOPN - sorting the batch cost of 77% (Top 1, Order by exprXXX) 4. Parallelism, gather streams (order by exprXXX) cost of 17% (this is the sort operation I presume 5. TOP - get the first N rows based on sort. There's some smart stuff going on here that prevents it from the need to create 340,000 guids. The query returned in .5 to 2 seconds in each case - not sure why the variance. That's a fairly lengthy query (as much as 2 seconds), but it is unlikely that I would find myself selected random records from a table of 30+ rows. Normally, it's only a few hundred rows - as in banner or image rotation. I do see the point of others that caching a query of a few hundred rows on the CF server and keeping the random part of the selection on the web server may in many cases be more efficient and practicaly. However, it seems to me that this a viable alternative and does not suffer from the lag time I expected - even on a very large query. Thanks for the tip. -Mark Mark A. Kruger, CFG, MCSE www.cfwebtools.com www.necfug.com http://mkruger.cfwebtools.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:219642 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: Every once in a while, I feel smart. A story of displaying a single random image.
If you don't need perfectly randomized results (and you usually don't), there are much more efficient ways to do this. Probably the easiest is to assign each row a sequential number, index the column, and then do this: SET @offset = round(rand() * (SELECT COUNT(*) FROM myTable)); SELECT TOP 1 * FROM myTable WHERE sequenceID = @offset Not sure that'll run (it's untested, and I'm not an MSSQL guy), but you get the idea. The cost, in this scenario, is in maintaining the sequential number list. I've found running script to rebuild the sequence (making sure to remove the index first, and put it back afterwards), every day or so to work quite well. The performance is excellent since no sorting or per-record value generation needs to take place at SELECT time. This algorithm also allows you to avoid ever returning duplicates (set sequenceID = NULL after pulling a record), and weight the different records (make the sequence use different size steps, rather than always one). cheers, barneyb On 9/29/05, Mark A Kruger [EMAIL PROTECTED] wrote: Taco, Ok ... this works, but I want to know how it works. For example, if I have a table of 5000 rows, does SQL: --- SELECT TOP 1 * FROM yourTable ORDER BY NEWID() - select all the rows assign guids (newid()) order all the rows return 1 back to me? I did this query against a table with 34 records in it on a busy server - that's a pretty good test, right? select top 1 id, user_id, client_id, type from [transaction] order by newid() The execution plan shows that SQL server does: 1. Table Scan at a cost of 5% of batch to count rows and compute table size 2. Compute Guid from existing values at a cost of 0% - (DEFINE(exprXXX=newid())) 3. Sort and TOPN - sorting the batch cost of 77% (Top 1, Order by exprXXX) 4. Parallelism, gather streams (order by exprXXX) cost of 17% (this is the sort operation I presume 5. TOP - get the first N rows based on sort. There's some smart stuff going on here that prevents it from the need to create 340,000 guids. The query returned in .5 to 2 seconds in each case - not sure why the variance. That's a fairly lengthy query (as much as 2 seconds), but it is unlikely that I would find myself selected random records from a table of 30+ rows. Normally, it's only a few hundred rows - as in banner or image rotation. I do see the point of others that caching a query of a few hundred rows on the CF server and keeping the random part of the selection on the web server may in many cases be more efficient and practicaly. However, it seems to me that this a viable alternative and does not suffer from the lag time I expected - even on a very large query. Thanks for the tip. -Mark -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 100 invites. ~| 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:219643 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: Every once in a while, I feel smart. A story of displaying a single random image.
Really close to something I use for a Random Quote Of The Day sort of thing. DECLARE @RowId as int SET @RowId = round(rand() * (SELECT COUNT(*) FROM Results),0); SELECT TOP 1 author, quote FROM Results WHERE Quoteid = @RowId You need the second parameter in the Round() function to determin precision. Matt Osbun Applications Manager Health Systems, International -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 11:36 AM To: CF-Talk Subject: Re: Every once in a while, I feel smart. A story of displaying a single random image. If you don't need perfectly randomized results (and you usually don't), there are much more efficient ways to do this. Probably the easiest is to assign each row a sequential number, index the column, and then do this: SET @offset = round(rand() * (SELECT COUNT(*) FROM myTable)); SELECT TOP 1 * FROM myTable WHERE sequenceID = @offset Not sure that'll run (it's untested, and I'm not an MSSQL guy), but you get the idea. The cost, in this scenario, is in maintaining the sequential number list. I've found running script to rebuild the sequence (making sure to remove the index first, and put it back afterwards), every day or so to work quite well. The performance is excellent since no sorting or per-record value generation needs to take place at SELECT time. This algorithm also allows you to avoid ever returning duplicates (set sequenceID = NULL after pulling a record), and weight the different records (make the sequence use different size steps, rather than always one). cheers, barneyb CONFIDENTIALITY NOTICE: The information contained in this transmission, 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 by Federal law. If you are not the intended recipient of this message, you are notified that you may not disclose, print, copy, or disseminate this information. If you have received this transmission in error, please reply to the sender and delete or destroy the message. Unauthorized interception of this transmission may be a violation of criminal law. ~| 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:219644 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: CF Tips... was CF smart
So you just want a text parser to look for a start and end 'tip' tag and treat whatever is in it as a tip to be loaded into a tip DB? I can do that. Let me see how easy it is. If your on the test list, you'll start seeing the code in place there. We need a Wiki or something to start compiling all the nifty solutions here. Is anyone on the Evolt.org list? They have a nice self building tips library by posters who just surround things with tip/tip. It would be interesting to build a cflist parser that throws something like this into an rss feed. Then the community could offer a tip to the feed here and there. Or not. ~| 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:219645 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: Every once in a while, I feel smart. A story of displaying a single random image.
Assuming quoteid is the primary key, that will cause issues if you ever delete a quote (or have non-contiguous values for some other reason). Doing a = won't affect randomness if that scenario doesn't exist, but if it does, it'll prevent zero-row results. This is the main reason for using a separate field, as quite frequently records get deleted, which makes the primary key unsuitable. And good call on round. Did I mention I'm not a MSSQL guy? ;) MySQL defaults the second param to zero if you omit it. cheers, barneyb On 9/29/05, Matt Osbun [EMAIL PROTECTED] wrote: Really close to something I use for a Random Quote Of The Day sort of thing. DECLARE @RowId as int SET @RowId = round(rand() * (SELECT COUNT(*) FROM Results),0); SELECT TOP 1 author, quote FROM Results WHERE Quoteid = @RowId You need the second parameter in the Round() function to determin precision. Matt Osbun Applications Manager Health Systems, International -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 100 invites. ~| 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:219646 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 Tips... was CF smart
That would be awesome. What's the test list subscription address? I think this is one of the coolest features on the Evolt list. I don't think there's rss accessible though. Keep us updated. Emmet -Original Message- From: Michael Dinowitz [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 1:16 PM To: CF-Talk Subject: Re: CF Tips... was CF smart So you just want a text parser to look for a start and end 'tip' tag and treat whatever is in it as a tip to be loaded into a tip DB? I can do that. Let me see how easy it is. If your on the test list, you'll start seeing the code in place there. We need a Wiki or something to start compiling all the nifty solutions here. Is anyone on the Evolt.org list? They have a nice self building tips library by posters who just surround things with tip/tip. It would be interesting to build a cflist parser that throws something like this into an rss feed. Then the community could offer a tip to the feed here and there. Or not. ~| 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:219647 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: Every once in a while, I feel smart. A story of displaying a single random image.
Hrmmm... Hadn't thought of that. Wondered about that = in your version. As you guessed, quoteid is an Int Identity Seed Primary Key, autoincrementing, sequential and all that. The conditions you mentioned aren't an issue *in this case*, as the table is pretty static, but you're right- the = approach is a better design. Thanks. Matt Osbun Applications Manager Health Systems, International -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 12:19 PM To: CF-Talk Subject: Re: Every once in a while, I feel smart. A story of displaying a single random image. Assuming quoteid is the primary key, that will cause issues if you ever delete a quote (or have non-contiguous values for some other reason). Doing a = won't affect randomness if that scenario doesn't exist, but if it does, it'll prevent zero-row results. This is the main reason for using a separate field, as quite frequently records get deleted, which makes the primary key unsuitable. And good call on round. Did I mention I'm not a MSSQL guy? ;) MySQL defaults the second param to zero if you omit it. cheers, barneyb CONFIDENTIALITY NOTICE: The information contained in this transmission, 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 by Federal law. If you are not the intended recipient of this message, you are notified that you may not disclose, print, copy, or disseminate this information. If you have received this transmission in error, please reply to the sender and delete or destroy the message. Unauthorized interception of this transmission may be a violation of criminal law. ~| 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:219648 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: ways to cache a query other than 'cachedwithin'
Okay, JIm, using this and your last suggestion, I have made a test case that I think points to the same issue that I was having in the beginning. Of course, the code that I have will run correctly. I agree that just testing for the qry_get_topcats var wasn't the right way to go... Running the code below, I always get the result MakeTree rides again when I refresh the page, so it apparently seems like the module call is not modifying the cached query, it is just modifying the cached query, but dropping that modified query at the end of the request - right? I also see that make_tree.cfm is being called every time when I turn on debugging. Weird? Normal behavior? cfquery name=qry_get_topcats datasource=#Request.DS# username=#Request.user# password=#Request.pass# cachedwithin=#Request.Cache# SELECT Category_ID, Name, Parent_ID, ParentIDs FROM Categories WHERE Categories.Display = 1 ORDER BY Priority, Name /cfquery cfif NOT IsDefined(qry_get_topcats.maketreesortlevel) MakeTree rides again cfmodule template=make_tree.cfm Query=#qry_get_topcats# Result=qry_get_topcats Unique=category_ID Parent=Parent_ID /cfif Jim Davis wrote: -Original Message- From: Jim Davis [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 12:12 PM To: CF-Talk Subject: RE: ways to cache a query other than 'cachedwithin' Now I'm not so sure about that... but I think I'm still right. The queryname is definitely used as part of the key to the cached data... but since it's not in a permanent scope I don't see how it could be available to be checked (using IsDefined()) until the query is run. I think this needs some testing... Do some testing... I think I'm correct. Run the following code (but change the query to actually work on your system): cfif IsDefined(MyQuery) Is Defined! cfelse Is NOT Defined! /cfif cfquery datasource=... name=MyQuery cachedwithin=1 result=MyQueryInfo SELECT ... /cfquery cfdump var=#MyQueryInfo# The first time you run it you'll see that MyQuery is not defined. The Query metadata will show that in this instance it's not been cached. The second time you run it you'll see that MyQuery is still not defined... but the metadata will show that the query was retrieved from cache. Hope this helps, Jim Davis ~| 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:219649 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: CF Tips... was CF smart
They have a nice self building tips library by posters who just surround things with tip/tip. It would be interesting to build a cflist parser that throws something like this into an rss feed. Check CF_REextract that can do this pretty easily: http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm?p=hf -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) 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:219650 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: Every once in a while, I feel smart. A story of displaying a single random image.
-Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 12:36 PM To: CF-Talk Subject: Re: Every once in a while, I feel smart. A story of displaying a single random image. If you don't need perfectly randomized results (and you usually don't), there are much more efficient ways to do this. Probably the easiest is to assign each row a sequential number, index the column, and then do this: SET @offset = round(rand() * (SELECT COUNT(*) FROM myTable)); SELECT TOP 1 * FROM myTable WHERE sequenceID = @offset That would work even just in cases where there's a numeric ID (an identity field in SQL Server)... you don't need to add a specific column to sort. But I agree wholeheartedly in theory: if this task is something you need to do then the data needed to do it should be built into the data definition. Also, if you don't have an identity or unique numeric field (and for some reason can't add one) you might be able to mimic it. Jim Davis ~| 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:219651 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: 7.0.1 Updater
Yes I got the correct one. What I ended up doing was updating my backup JRun installation and when I did that I noticed that the installer created a directory named 'updater_backup'. From that listing, I copied the needed files from the JRun directory over to the one I wanted updated. -Original Message- From: Stephen Moretti [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 28, 2005 9:36 AM To: CF-Talk Subject: Re: 7.0.1 Updater Steve Brownlee wrote: Anyone been having problems installing the 7.0.1 updater EXE? I can't get it to install because it appears to only support people who are running JRun as their application server. Seems kind of silly to put out an updater that only support one of the three ways that CF7 can be deployed. If I'm way off base here and it's possible to get this to run for those running on another J2EE server, please let me know. Did you get the correct updater? There are about 5 different installers depending on your OS and set up. ~| 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:219652 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: 7.0.1 Updater
That's awesome, Jaye. I'm glad you OSX folks finally have a ColdFusion package. As an addition to my original posting, while I was trying to get the updater to install for me, I decided to apply the latest Cumulative Hotfix to my system. However, when I restart the service, I see this message in the log file. Anyone seen this before? INFO 2005-09-29 13:42:02,958 [STDOUT] Ignoring invalid file in updates directory: chf73.jar -Original Message- From: Jaye Morris [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 28, 2005 3:26 PM To: CF-Talk Subject: Re: 7.0.1 Updater My Powerbook install was perfect. ~| 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:219653 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: CF Tips... was CF smart
http://www.houseoffusion.com/cf_lists/threads.cfm/1 The code is set to only take a tip from that list and email the results to me. There is a single tip allowed per post and a tip is any content within the tip and /tip tags. If this works out properly, then I'll add it to the full list processor. That would be awesome. What's the test list subscription address? I think this is one of the coolest features on the Evolt list. I don't think there's rss accessible though. Keep us updated. Emmet -Original Message- From: Michael Dinowitz [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 1:16 PM To: CF-Talk Subject: Re: CF Tips... was CF smart So you just want a text parser to look for a start and end 'tip' tag and treat whatever is in it as a tip to be loaded into a tip DB? I can do that. Let me see how easy it is. If your on the test list, you'll start seeing the code in place there. We need a Wiki or something to start compiling all the nifty solutions here. Is anyone on the Evolt.org list? They have a nice self building tips library by posters who just surround things with tip/tip. It would be interesting to build a cflist parser that throws something like this into an rss feed. Then the community could offer a tip to the feed here and there. Or not. ~| 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:219654 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: Every once in a while, I feel smart. A story of displaying a single random image.
It works a lot better if you have a specific sort column, at least in a lot of scenarios. Say you have id's 1-10, and then you deleted 2, 3, and 4. If you use the id column, suddenly id 5 has a 4:10 chance of being selected, while 1 and 6-10 still only have 1:10 chance. By having a separate column, you can resequence to eliminate the gap, and retain the proper odds (1:7 in this case) for all records. If you don't have many gaps in your id series, don't care if the results become less random as you delete rows, the storage requirements (a byte per row) are an issue, or the performance of using the clustered index is necessary, then using the primary key makes sense, but otherwise I'd recommend a separate field for it. And of course, that field (primary key or otherwise) has to be sequential integers; if you PK is UUIDs or something, you HAVE to use a separate field. cheers, barneyb On 9/29/05, Jim Davis [EMAIL PROTECTED] wrote: -Original Message- From: Barney Boisvert [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 12:36 PM To: CF-Talk Subject: Re: Every once in a while, I feel smart. A story of displaying a single random image. If you don't need perfectly randomized results (and you usually don't), there are much more efficient ways to do this. Probably the easiest is to assign each row a sequential number, index the column, and then do this: SET @offset = round(rand() * (SELECT COUNT(*) FROM myTable)); SELECT TOP 1 * FROM myTable WHERE sequenceID = @offset That would work even just in cases where there's a numeric ID (an identity field in SQL Server)... you don't need to add a specific column to sort. But I agree wholeheartedly in theory: if this task is something you need to do then the data needed to do it should be built into the data definition. Also, if you don't have an identity or unique numeric field (and for some reason can't add one) you might be able to mimic it. Jim Davis -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 100 invites. ~| 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:219655 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: CF Tips... was CF smart
I used: CFSET sTip=REFindNoCase('tip(.+?)/tip', body, 1, 1) CFIF ArrayLen(sTip.pos) GT 1 CFSET Tip=mid(body, sTip.pos[2], sTip.Len[2]) /CFIF They have a nice self building tips library by posters who just surround things with tip/tip. It would be interesting to build a cflist parser that throws something like this into an rss feed. Check CF_REextract that can do this pretty easily: http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm?p=hf -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) Thanks. ~| 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:219656 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
CF_Underground topics, early bird ends Friday 9/30
The CF_Underground early bird price ends tomorrow days on 9/30/05. Join us prior to Macromedia's MAX conference in Anaheim, California for CF_Underground VII - the must attend pre-show event. Enjoy lunch and a beer on us! Have a great time with our speakers including Hal Helms, Michael Smith, Bogdan Ripa, and Simon Horwith. Here are the topic details: Hal Helms: How Domain models save time Do you keep reinventing code at your organization time after time? Learn how to organize your business objects to save time. Simon Horwith: Paper Prototyping and Architecture In this hands on session Simon will show you how he saves time prototyping and architecting on paper! Learn new tips to deliver better quality software that your clients will love to use. Bogdan Ripa: Dreamweaver on steriods In this session, Bogdan will explain you some must-knows about expanding what Dreamweaver can do. Michael Smith: Security round table. Are your websites secure from hackers? What best practices should you be using in your code? What about database security? Are your credit card records safe? Join in this dicussion to learn what others are doing and what the best security practices are. Jared Rypka-Hauer: Tidy Code... the Secret to Eternal Happiness OK, so tidy code may not make you happy, but it does make your life easier. Join us in a discussion about practices, preferences, needs and ideas regarding keeping code neat, organizing code, and keeping applications from becoming a tangled bowl of cooked spaghetti. Remember, tidy code is happy code... and happier developers. As this session is geared toward discussion, specific topic coverage will vary. Panel - ask your questions When: Saturday, October 15th, 2005 Time: 10am-5pm Where: The Desert Palms Hotel in Anaheim CA 631 West Katella Ave., Anaheim, CA 92802 Across from the Anaheim Convention Center The Early Bird rate is only $69, which expires September 30th 2005 After that the price is $99 Sign up today! http://www.cfconf.com/cf_underground7/ Quotes: Fantastic job guys!! - Dominic Plouffe Best event so far. - David Epler Thought this was great. My first time and will definitely attend next year. - Scott Young Lots of fun! - Amy Grothaus Good job. I attended the Underground meeting in DC(2000). I'm very pleased with today's events. - Juan Moyer Thanks for a great time! - Jason Clark Learn a bunch of cool CF programming meta tricks to save you time and headaches. See you there! -- Due to TeraTech's growth we are seeking winning sales people to sell custom software. For more details: http://www.teratech.com/index.cfm?go=About.JobDetailJobID=3 Michael Smith, TeraTech, Inc 405 E Gude Dr Ste 207, Rockville MD 20850 Voice: +1-301-424-3903 x110 Fax:301-762-8185 Web: http://www.teratech.com/sig/ Email: mailto:[EMAIL PROTECTED] ICQ: 66057682 Winner in CFDJ awards Best Consulting. Member Team Fusebox. ~| 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:219657 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
AOL and session variables?
A client of mine who uses AOL is having problems logging into the CMS which I built for her. I believe I've narrowed it down to a session variable thing. The website either doesn't see the var or it thinks that the var is false when it should be true. Here's the line from my app.cfm file: cfapplication name=no sessionmanagement=Yes setclientcookies=Yes sessiontimeout=#createtimespan(1,0,0,0)# clientmanagement=yes clientstorage=cookie Here's how I log her in: cfset session.loggedin = 1 Then on every page of the site (in the header include) I have this code: cfif NOT IsDefined(SESSION.loggedin) OR SESSION.loggedin IS 0 cflocation url=index.cfm?unlog addToken=no /cfif It let's her IN to the site, but when she tries to access any of the pages in the admin section it dumps her back to the login screen. I found this page on AOL's site about enabling cookies, but it didn't help. http://webmaster.info.aol.com/cookieguide.html Does anyone have any ideas about this? !//-- andy matthews web developer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- ~| 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:219658 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: CF Tips... was CF smart
Nice job. Now will this eventually be moved into its own feed? Emmet -Original Message- From: Michael Dinowitz [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 1:57 PM To: CF-Talk Subject: Re: CF Tips... was CF smart I used: CFSET sTip=REFindNoCase('tip(.+?)/tip', body, 1, 1) CFIF ArrayLen(sTip.pos) GT 1 CFSET Tip=mid(body, sTip.pos[2], sTip.Len[2]) /CFIF They have a nice self building tips library by posters who just surround things with tip/tip. It would be interesting to build a cflist parser that throws something like this into an rss feed. Check CF_REextract that can do this pretty easily: http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm?p=hf -- ___ REUSE CODE! Use custom tags; See http://www.contentbox.com/claude/customtags/tagstore.cfm (Please send any spam to this address: [EMAIL PROTECTED]) 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:219660 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: AOL and session variables?
Yea, tell her to stop using aol... Even if you're using aol for dialup, you can still use an external browser. Teach her how to start up an external internet explorer, or better yet firefox. Russ -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 1:59 PM To: CF-Talk Subject: AOL and session variables? A client of mine who uses AOL is having problems logging into the CMS which I built for her. I believe I've narrowed it down to a session variable thing. The website either doesn't see the var or it thinks that the var is false when it should be true. Here's the line from my app.cfm file: cfapplication name=no sessionmanagement=Yes setclientcookies=Yes sessiontimeout=#createtimespan(1,0,0,0)# clientmanagement=yes clientstorage=cookie Here's how I log her in: cfset session.loggedin = 1 Then on every page of the site (in the header include) I have this code: cfif NOT IsDefined(SESSION.loggedin) OR SESSION.loggedin IS 0 cflocation url=index.cfm?unlog addToken=no /cfif It let's her IN to the site, but when she tries to access any of the pages in the admin section it dumps her back to the login screen. I found this page on AOL's site about enabling cookies, but it didn't help. http://webmaster.info.aol.com/cookieguide.html Does anyone have any ideas about this? !//-- andy matthews web developer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- ~| 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:219659 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
CF 7 on OS X: JVM 1.5?
I just installed the Server version of 7.0.1 on my OS X 10.4 system (switching from 7 on JRun4) and was wondering if it's possible to specify the 1.5 JVM as the one CF uses? I know it isn't officially supported, but has anyone tried it? You can set the JVM in the Server Settings/Java and JVM panel of the administrator. -- In my many years I have come to a conclusion that one useless man is a shame, two is a law firm, and three or more is a congress. John Adams ~| 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:219662 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: CF Tips... was CF smart
OK, the code works well and will seperate a single tip from a message. I'm still playing to deal with a quoted tip, but that should not be much of a problem either. ~| 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:219661 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: AOL and session variables?
Yeah... I did get her to use IE, which works. But I'd rather know what's going on. I use this same codebase for almost all of my CMS and I wonder how many users might be having problems logging in and never telling us. !//-- andy matthews web developer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- -Original Message- From: Russ [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 1:11 PM To: CF-Talk Subject: RE: AOL and session variables? Yea, tell her to stop using aol... Even if you're using aol for dialup, you can still use an external browser. Teach her how to start up an external internet explorer, or better yet firefox. Russ -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 1:59 PM To: CF-Talk Subject: AOL and session variables? A client of mine who uses AOL is having problems logging into the CMS which I built for her. I believe I've narrowed it down to a session variable thing. The website either doesn't see the var or it thinks that the var is false when it should be true. Here's the line from my app.cfm file: cfapplication name=no sessionmanagement=Yes setclientcookies=Yes sessiontimeout=#createtimespan(1,0,0,0)# clientmanagement=yes clientstorage=cookie Here's how I log her in: cfset session.loggedin = 1 Then on every page of the site (in the header include) I have this code: cfif NOT IsDefined(SESSION.loggedin) OR SESSION.loggedin IS 0 cflocation url=index.cfm?unlog addToken=no /cfif It let's her IN to the site, but when she tries to access any of the pages in the admin section it dumps her back to the login screen. I found this page on AOL's site about enabling cookies, but it didn't help. http://webmaster.info.aol.com/cookieguide.html Does anyone have any ideas about this? !//-- andy matthews web developer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:219663 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: AOL and session variables?
Aol is probably blocking cookies or something weird like that... just hop on aol yourself and test it out... -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 2:20 PM To: CF-Talk Subject: RE: AOL and session variables? Yeah... I did get her to use IE, which works. But I'd rather know what's going on. I use this same codebase for almost all of my CMS and I wonder how many users might be having problems logging in and never telling us. !//-- andy matthews web developer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- -Original Message- From: Russ [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 1:11 PM To: CF-Talk Subject: RE: AOL and session variables? Yea, tell her to stop using aol... Even if you're using aol for dialup, you can still use an external browser. Teach her how to start up an external internet explorer, or better yet firefox. Russ -Original Message- From: Andy Matthews [mailto:[EMAIL PROTECTED] Sent: Thursday, September 29, 2005 1:59 PM To: CF-Talk Subject: AOL and session variables? A client of mine who uses AOL is having problems logging into the CMS which I built for her. I believe I've narrowed it down to a session variable thing. The website either doesn't see the var or it thinks that the var is false when it should be true. Here's the line from my app.cfm file: cfapplication name=no sessionmanagement=Yes setclientcookies=Yes sessiontimeout=#createtimespan(1,0,0,0)# clientmanagement=yes clientstorage=cookie Here's how I log her in: cfset session.loggedin = 1 Then on every page of the site (in the header include) I have this code: cfif NOT IsDefined(SESSION.loggedin) OR SESSION.loggedin IS 0 cflocation url=index.cfm?unlog addToken=no /cfif It let's her IN to the site, but when she tries to access any of the pages in the admin section it dumps her back to the login screen. I found this page on AOL's site about enabling cookies, but it didn't help. http://webmaster.info.aol.com/cookieguide.html Does anyone have any ideas about this? !//-- andy matthews web developer ICGLink, Inc. [EMAIL PROTECTED] 615.370.1530 x737 --//- ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:219664 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