Re: client holding open a connection
Funky stuff. I always just assumed that the server sends off the content and then closes the response regardless of what the client is doing (otherwise, how would the server know if the client closed the page half way through page load). I know very little about server internals. -Ben -- Ben Nadel Adobe Community Expert Adobe Certified Advanced ColdFusion Developer Manager New York ColdFusion User Group http://www.bennadel.com Need ColdFusion Help? http://www.bennadel.com/Ask-Ben ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323500 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
scoping
Say you defined a local variable like this on a CFM page and it returns a query object: Should I write out my variables like this when I out the query object? #variables.foo.goo# Or is this sufficient? #foo.goo# ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323501 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Case Sensitive SQL
Thanks Peter, Roger, Claude and Shane :) well I am using encryption and I do agree MS Access is only good for small personal works and not for medium or large scale applications. Besides, I have another small query, when I use the GROUP BY clause with MS Access it gives the error something like 'object overflow'. The query works fine without the GROUP BY clause. It's a simple select query having a where clause followed by an ORDER BY clause but when I add the GROUP BY clause it gives the object overflow error. Even when I write this SQL in MS Access itself, it gives the same error. Does any1 has any idea... is there a problem with my SQL skills or do I just need to change my database ;) If any1 could provide his workable SELECT QUERY with WHERE, ORDER and GROUP BY clause... that would be superb :)) Regards, Arsalan -- From: "Peter Boughton" Sent: Monday, June 15, 2009 11:02 AM To: "cf-talk" Subject: Re: Case Sensitive SQL > > Probably a little over-the-top, but the point still stands. > > MS Access is fine for basic office use, but for web apps you're better off > picking Derby, H2, MySQL, Postgres, etc - or one of the free 'Express' > editions of Oracle or MS SQL Server. > > > More importantly though, I just noticed this is discussing passwords, > which I missed the first time. > > If something is important enough to password protect, then that password > should - at the very least - be MD5 hashed, (if not a more secure salted > SHA hash, or similar). > If it's not important enough for that, just ditch the password altogether. > > And that aside, if the value is user input, use cfqueryparam! > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323502 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: scoping
If you don't explicitly assign a variable to a scope, then it's automatically put into the VARIABLES scope. So in your example, you could refer to your var as foo and it would be just fine. Having said that, it's a best practice to explicitly scope your variables to avoid confusion, and potential collisions. andy -Original Message- From: Chad Gray [mailto:cg...@careyweb.com] Sent: Monday, June 15, 2009 9:22 AM To: cf-talk Subject: scoping Say you defined a local variable like this on a CFM page and it returns a query object: Should I write out my variables like this when I out the query object? #variables.foo.goo# Or is this sufficient? #foo.goo# ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323503 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: scoping
#foo.goo# is acceptable. I, personally, explicitly scope every variable: #VARIABLES.foo.goo# We also have an extremely high traffic, high utilization application, so explicitly scoping every var helps us keep memory in check (plus makes maintaining the code easier). Steve "Cutter" Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer Co-Author of "Learning Ext JS" http://www.packtpub.com/learning-ext-js/book _ http://blog.cutterscrossing.com On 6/15/2009 9:22 AM, Chad Gray wrote: > Say you defined a local variable like this on a CFM page and it returns a > query object: > > > > Should I write out my variables like this when I out the query object? > > #variables.foo.goo# > > Or is this sufficient? > #foo.goo# > > > > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323504 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Case Sensitive SQL
What are the data types of the columns you're trying to GROUP BY? I'm sure it will barf on a memo field, for instance. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323505 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Case Sensitive SQL
>>MS Access is fine for basic office use, but for web apps you're better off picking Derby, H2, MySQL, Postgres, etc - or one of the free 'Express' editions of Oracle or MS SQL Server. Legend, pure urban legend ! Access applications have a bad reputation, but do not forget that accessing an Access database through ODBC or JDBC under CF IS NOT an Access application: it is a CF application. Do not mistake the database file with the VBscript application that may be embedded in the file. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323506 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
cfpop attachments question
Hi, Does cfpop treat attachments different depending of their extension? I have this case where an email contains a number of eml attachments. If view the email in outlook i can see all the attachments listed. When dumping the cfpop query I have the attachmentfiles listed but the attachments column is empty. Of course it works fine with other extensions. Am I missing something? Thanks Victor ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323507 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Case Sensitive SQL
On Mon, Jun 15, 2009 at 7:33 AM, Claude Schneegans wrote: > > >>MS Access is fine for basic office use, but for web apps you're > better off picking Derby, H2, MySQL, Postgres, etc - or one of the free > 'Express' editions of Oracle or MS SQL Server. > > Legend, pure urban legend ! Ok.. So you disagree that Access is a low choice for web apps? > Access applications have a bad reputation, Gotcha. You think access is a good web app then? > but do not forget that > accessing an Access database through ODBC or JDBC > under CF IS NOT an Access application: it is a CF application. > Do not mistake the database file with the VBscript application that may > be embedded in the file. Most of the arguments I have for not using access on any web app has nothing to do with the VB Scripting of said file. and you mentioning that accessing it through ODBC or JDBC is not an access application... So you are defeating your point at the top. There is very few reasons why you would want a Web App with Access. None of them that I can think of would be useful in a web app that is worked on by 2 or more people (which most web apps are). I really can't understand the "fanboy" attitude people have for access. There's so many things out there that are better. Heck, if Microsoft thought access was the end all, be all, we wouldn't have MS-SQL. If Microsoft won't stand behind their product as being a full database, then why do other people do ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323508 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Case Sensitive SQL
Guys this is my working query... SELECT id, site, far_end, site_type, phase, lat, long, cluster AS clust, city, region, sites_status FROM sites WHERE site IS NOT NULL AND siteID1 = '#UCASE(Rereplacenocase(form.site,"-| ","","ALL"))#' AND siteID2 = '#UCASE(Rereplacenocase(form.farend,"-| ","","ALL"))#' AND site_type = #form.tos# AND region = #form.region# AND cluster = #form.cluster# AND phase = #form.phase# AND city = #form.city# ORDER BY region now if I add 'GROUP BY clust' then it gives an error. The cluster field is Integer. Regards, Arsalan -- From: "Phillip Vector" Sent: Monday, June 15, 2009 8:40 PM To: "cf-talk" Subject: Re: Case Sensitive SQL > > On Mon, Jun 15, 2009 at 7:33 AM, Claude > Schneegans wrote: >> >> >>MS Access is fine for basic office use, but for web apps you're >> better off picking Derby, H2, MySQL, Postgres, etc - or one of the free >> 'Express' editions of Oracle or MS SQL Server. >> >> Legend, pure urban legend ! > > Ok.. So you disagree that Access is a low choice for web apps? > >> Access applications have a bad reputation, > > Gotcha. You think access is a good web app then? > >> but do not forget that >> accessing an Access database through ODBC or JDBC >> under CF IS NOT an Access application: it is a CF application. >> Do not mistake the database file with the VBscript application that may >> be embedded in the file. > > Most of the arguments I have for not using access on any web app has > nothing to do with the VB Scripting of said file. > > and you mentioning that accessing it through ODBC or JDBC is not an > access application... So you are defeating your point at the top. > > There is very few reasons why you would want a Web App with Access. > None of them that I can think of would be useful in a web app that is > worked on by 2 or more people (which most web apps are). > > I really can't understand the "fanboy" attitude people have for > access. There's so many things out there that are better. Heck, if > Microsoft thought access was the end all, be all, we wouldn't have > MS-SQL. > > If Microsoft won't stand behind their product as being a full > database, then why do other people do > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323509 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
AW: scoping
Steve, just a quick info here. If you have every variable in the variables scope prefixed with "variables." it is actually slower (factor 2 at least) than if you address it without the "variables." notation. This is valid for Adobe's CFML implementation. In Railo it's indifferent. Whereas inside CFC's the "variables." notation is faster than writing it without the "variables.". My personal recommendation is: Scope everything except the variables scope. And for readability reasons scope queries as well! So do it like this: #susi.name# Greetings from Switzerland Gert Franz Railo Technologies Professional Open Source skype: gert.franz g...@getrailo.com www.getrailo.ch -Ursprüngliche Nachricht- Von: Cutter (CFRelated) [mailto:cold.fus...@cutterscrossing.com] Gesendet: Montag, 15. Juni 2009 16:28 An: cf-talk Betreff: Re: scoping #foo.goo# is acceptable. I, personally, explicitly scope every variable: #VARIABLES.foo.goo# We also have an extremely high traffic, high utilization application, so explicitly scoping every var helps us keep memory in check (plus makes maintaining the code easier). Steve "Cutter" Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer Co-Author of "Learning Ext JS" http://www.packtpub.com/learning-ext-js/book _ http://blog.cutterscrossing.com On 6/15/2009 9:22 AM, Chad Gray wrote: > Say you defined a local variable like this on a CFM page and it returns a query object: > > > > Should I write out my variables like this when I out the query object? > > #variables.foo.goo# > > Or is this sufficient? > #foo.goo# > > > > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323510 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Case Sensitive SQL
>>There is very few reasons why you would want a Web App with Access. None of them that I can think of would be useful in a web app that is worked on by 2 or more people (which most web apps are). 1. Access is not sensitive to SQL injection. 2. Only one file for the whole database, the whole database can be moved in and out by a simple FTP transfer. 3. Searchable memo fields, Again, for small/medium applications, this is valuable. >>in a web app that is worked on by 2 or more people (which most web apps are). In CF Web applications there is only ONE user at a time on the database: ColdFusion. There may be several users in the CF application, but only one in the database: ColdFusion. If multiuser applications are not running properly, the problem is with the way the ColdFusion application is accessing the database file not with the datasource file per se. There is simply NO Access application on the Web, what is called an application is actually the code that makes it running. There is no Access code in a CF application using an Access database, only CF code. So everything you may have heard or read about "Access applications" is not applicable to access datasources under CF. I've been using Access datasources in small/medium application since ColdFusion 1.4, for more than 10 years, and I haven't encountered the slightest glitch imputable to the Access datasource. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323511 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Case Sensitive SQL
>>now if I add 'GROUP BY clust' then it gives an error. Where do yo add the GROUP BY clause ? ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323512 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Case Sensitive SQL
I add it at the end of the query, after the ORDER BY clause. Although I have tried adding it right after the WHERE clause and just before the ORDER BY clause as well... but hard luck :) -- From: "Claude Schneegans" Sent: Monday, June 15, 2009 9:10 PM To: "cf-talk" Subject: Re: Case Sensitive SQL > > >>now if I add 'GROUP BY clust' then it gives an error. > > Where do yo add the GROUP BY clause ? > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323513 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: google style paging navigation
Thanks, Ryan. I would have replied earlier if I had seen it. Mike P, check out my Pagination.cfc project: http://paginationcfc.riaforge.org/ I have an example of how to emulate the google paging here: http://www.dopefly.com/projects/pagination/examples/index.cfm?style=google The examples app, including images and css, are included in the download from riaforge. nathan strutz [Blog and Family @ http://www.dopefly.com/] [AZCFUG Manager @ http://www.azcfug.org/] [Twitter @nathanstrutz] On Sun, Jun 14, 2009 at 3:34 PM, Ryan Letulle wrote: > > Nathan Strutz at > http://www.dopefly.com/projects/pagination/examples/ > > -- > Ryan LeTulle > > > On Sun, Jun 14, 2009 at 5:25 PM, mike pop wrote: > > > > > does anybody have snippets for creating google style like paging > > navigation. > > > > First Rec - Previous Rec 31 32 33 34 35 36 37 38 39 40 Next Rec - Last > Rec > > > > The current page should not display a link > > The Next Rec will increment the page link by one > > (e.g. if the user in this case clicks Next Rec, the links displayed will > be > > 32..41) > > > > google is a bit different but I want to display the page numbers > > sequentially and only 10 items or whatever is set to. > > > > I've found the most basic tutorials on navigation but nothing like google > > style navigation. I can't find code snippets from a previous project. > > > > Please help me > > > > Thank you for your help > > > > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323514 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Case Sensitive SQL
>>now if I add 'GROUP BY clust' then it gives an error. In a GROUP BY clause, you must enumerate all fields in your SELECT See : http://msdn.microsoft.com/en-us/library/aa259187(SQL.80).aspx#_group_by_clause ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323515 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Case Sensitive SQL
On Mon, Jun 15, 2009 at 4:56 PM, Arsalan Tariq Keen wrote: > > SELECT id, site, far_end, site_type, phase, lat, long, cluster AS > clust, city, region, sites_status > FROM sites > ORDER BY region > > > > now if I add 'GROUP BY clust' then it gives an error. Don't forget that every column that is in your SELECT list should either be an aggregate statement or should be in the list of columns in the GROUP BY. Jochem -- Jochem van Dieten http://jochem.vandieten.net/ ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323516 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Case Sensitive SQL
Right, include all the columns, but also GROUP BY cluster not GROUP BY clust In other words, group on the actual column name, not the alias. Now, if your goal is simply to get only 1 of every record combination, since you're not using any other Aggregate functions besides GROUP BY, why not just use DISTINCT? SELECT DISTINCT id, site, far_end, site_type, phase, lat, long, cluster AS clust, city, region, sites_status FROM sites WHERE site IS NOT NULL AND siteID1 = '#UCASE(Rereplacenocase(form.site,"-| ","","ALL"))#' AND siteID2 = '#UCASE(Rereplacenocase(form.farend,"-| ","","ALL"))#' IS NOT '0'>AND site_type = #form.tos# form.region IS NOT '0'>AND region = #form.region# form.cluster IS NOT '0'>AND cluster = #form.cluster# form.phase IS NOT '0'>AND phase = #form.phase# form.city IS NOT '0'>AND city = #form.city# ORDER BY region From: "Jochem van Dieten" Sent: Monday, June 15, 2009 12:15 PM To: "cf-talk" Subject: Re: Case Sensitive SQL On Mon, Jun 15, 2009 at 4:56 PM, Arsalan Tariq Keen wrote: > > � � � �SELECT id, site, far_end, site_type, phase, lat, long, cluster > AS > clust, city, region, sites_status > � � � �FROM sites > � � � �ORDER BY region > > > > now if I add 'GROUP BY clust' then it gives an error. Don't forget that every column that is in your SELECT list should either be an aggregate statement or should be in the list of columns in the GROUP BY. Jochem -- Jochem van Dieten http://jochem.vandieten.net/ ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323517 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: client holding open a connection
Ben, I won't claim that I know that much more about server internals, but I do know that the web server doesn't just send the entire response (which could be megs in size) out into the Internet and hope the end computer actually receives it. How would that handle lost or corrupt packets? If you have ever used SeeFusion, you will see it has a "time to first byte" number. Ignoring use of the cfflush tag, if a web page being processed has a TTFB value of 500 ms but the total page time was 10 seconds, that tells you that CF finished its work in half a second, and the first byte of the response went out to the client after half a second. It also tells you the client took 9.5 seconds to finish receiving the response. The client's connection speed is usually at fault. What that tells us though, is that the web server "knows" that the client is still receiving the data, and it re-sends any packets that weren't received correctly. (Once received, all the packets are reassembled on the client to form the entire response) To prove this, download a packet analyzer like WireShark (used to be Ethereal) and hit a web page while capturing. Filter on that TCP stream, and you will see the request headers, and response headers/body. Go back and look at each TCP packet to be sent, and after the initial HTTP GET request, you will see a series of packets coming back from the remote server, after every few packets, you will see an "HTTP [ACK]" begin sent from your computer back to the server basically saying "Hey, I got it!" This conversation of "here you go" and "hey, I got it" continues until the entire HTTP response has been transferred to the client. The final packet has a "FIN" flag which is also acknowledged that states that was the end of the packets. To my knowledge, all of this happens at a pretty low level after your CF code has finished processing. The Java thread is still in use though while the data is being read out of the servlet response's buffer. If the client does not respond, I think the server tries sending response packets (which will get no reply) until it finally gives up after a period of time. If the user closes their browser while the page is still being processed, the server wouldn't know until it finished, and tried to start sending the response. If the user closes their browser while it is still receiving the response, I think the server would stop getting acknowledgments and would eventually time out and give up. In either case, the entire page (and all it's queries, etc) still get processed. Here's a good page on the subject: http://tldp.org/HOWTO/Unix-and-Internet-Fundamentals-HOWTO/internet.html ~Brad Original Message Subject: Re: client holding open a connection From: Ben Nadel Date: Mon, June 15, 2009 7:54 am To: cf-talk Funky stuff. I always just assumed that the server sends off the content and then closes the response regardless of what the client is doing (otherwise, how would the server know if the client closed the page half way through page load). ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323518 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: google style paging navigation
NP NathanI was impressed when I was turned on to it last week. Nice work. -- Ryan LeTulle On Mon, Jun 15, 2009 at 11:03 AM, Nathan Strutz wrote: > > Thanks, Ryan. > I would have replied earlier if I had seen it. > > Mike P, check out my Pagination.cfc project: > http://paginationcfc.riaforge.org/ > I have an example of how to emulate the google paging here: > http://www.dopefly.com/projects/pagination/examples/index.cfm?style=google > > The examples app, including images and css, are included in the download > from riaforge. > > nathan strutz > [Blog and Family @ http://www.dopefly.com/] > [AZCFUG Manager @ http://www.azcfug.org/] > [Twitter @nathanstrutz] > > > On Sun, Jun 14, 2009 at 3:34 PM, Ryan Letulle wrote: > > > > > Nathan Strutz at > > http://www.dopefly.com/projects/pagination/examples/ > > > > -- > > Ryan LeTulle > > > > > > On Sun, Jun 14, 2009 at 5:25 PM, mike pop > wrote: > > > > > > > > does anybody have snippets for creating google style like paging > > > navigation. > > > > > > First Rec - Previous Rec 31 32 33 34 35 36 37 38 39 40 Next Rec - Last > > Rec > > > > > > The current page should not display a link > > > The Next Rec will increment the page link by one > > > (e.g. if the user in this case clicks Next Rec, the links displayed > will > > be > > > 32..41) > > > > > > google is a bit different but I want to display the page numbers > > > sequentially and only 10 items or whatever is set to. > > > > > > I've found the most basic tutorials on navigation but nothing like > google > > > style navigation. I can't find code snippets from a previous project. > > > > > > Please help me > > > > > > Thank you for your help > > > > > > > > > > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323519 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Case Sensitive SQL
Well... Jason ID and SITE will always have unique values no duplicates allowed. Other than that, CLUSTER field can have duplicate values. In simple English if I phrase it, "Multiple SITEs can belong to a SINGLE CLUSTER" and that's why I need to GROUP BY cluster. It's basically a Telecom data management project :)) (That is why it has to be so mismanaged ;)... lolz!) -- From: "Jason Fisher" Sent: Monday, June 15, 2009 11:08 PM To: "cf-talk" Subject: Re: Case Sensitive SQL > > Right, include all the columns, but also > > GROUP BY cluster > > not > > GROUP BY clust > > In other words, group on the actual column name, not the alias. > > Now, if your goal is simply to get only 1 of every record combination, > since you're not using any other Aggregate functions besides GROUP BY, why > not just use DISTINCT? > > SELECT DISTINCT id, site, far_end, site_type, phase, lat, long, cluster AS > clust, city, region, sites_status >FROM sites >WHERE site IS NOT NULL >AND siteID1 = '#UCASE(Rereplacenocase(form.site,"-| > ","","ALL"))#' >AND siteID2 = '#UCASE(Rereplacenocase(form.farend,"-| > ","","ALL"))#' > IS NOT '0'>AND site_type = #form.tos# > form.region IS NOT '0'>AND region = #form.region# > form.cluster IS NOT '0'>AND cluster = #form.cluster# > form.phase IS NOT '0'>AND phase = #form.phase# > form.city IS NOT '0'>AND city = #form.city# >ORDER BY region > > > From: "Jochem van Dieten" > Sent: Monday, June 15, 2009 12:15 PM > To: "cf-talk" > Subject: Re: Case Sensitive SQL > > On Mon, Jun 15, 2009 at 4:56 PM, Arsalan Tariq Keen wrote: >> >> � � � �SELECT id, site, far_end, site_type, phase, lat, long, >> cluster AS >> clust, city, region, sites_status >> � � � �FROM sites > >> � � � �ORDER BY region >> >> >> >> now if I add 'GROUP BY clust' then it gives an error. > > Don't forget that every column that is in your SELECT list should > either be an aggregate statement or should be in the list of columns > in the GROUP BY. > > Jochem > > -- > Jochem van Dieten > http://jochem.vandieten.net/ > > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323520 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Case Sensitive SQL
Okay, that makes sense, but I'm thinking that you won't be able to do the grouping at the SQL level in that case. As Jochem noted, GROUP BY can only put records together where all the grouped fields match, and the assumption is that all other columns are summarized or otherwise aggregated. In short, you still have to do something with the other columns (id, site, far_end, site_type, phase, lat, long, city, region, sites_status) if you try to group on cluster. Depending on what you need to do with the data on output, you might want to ORDER BY cluster and then do grouping on output (just a table-based listing example): #clust# #site# #far_end# #site_type# #phase# lat: #lat# long: #long# #city# #region# #site_status# ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323521 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Case Sensitive SQL
>>ID and SITE will always have unique values no duplicates allowed. Ok, but you still have to list all columns in your SELECT list, it is a matter of SQL syntax, not logic. In pure logic, a "GROUP" clause should be enough, since one has no choice, but this is the way SQL has been designed. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323522 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: User Authentication without Session Expiration
Thank you both for the assistance. I was trying to stay away from session variables, but I think I will just increase the session timeout to a couple of hours and not worry about the method I was wanting to implement. We won't have so many users that it would put a strain on our web server. Thanks, Mike -Original Message- From: Arsalan Tariq Keen [mailto:arsalk...@hotmail.com] Sent: Saturday, June 13, 2009 8:47 AM To: cf-talk Subject: Re: User Authentication without Session Expiration I suggest, you keep the credentials encrypted or decrypted as you wish, but keep them on the Application server in the session scope and for the browser thingeee use a simple cookie to maintain the heartbeat. You can use a cookie by the name 'logedin' and set its value true. Every time a new page is requested check for the session scope and the browser cookie to have the mentioned value. If the session scope expires then the user will have to sign-in again. However, if the cookie expires, lets say bcoz of closing the browser window on the client side, you can redirect the user to the signin page where its username is already being displayed and you ask for password AGAIN to continue. Something which often happens on yahoo and hotmail :) -- From: "Dawson, Michael" Sent: Saturday, June 13, 2009 7:17 PM To: "cf-talk" Subject: RE: User Authentication without Session Expiration > > No one has any suggestions for this issue? > > _ > > From: Dawson, Michael [mailto:m...@evansville.edu] > Sent: Fri 6/12/2009 10:24 AM > To: cf-talk > Subject: User Authentication without Session Expiration > > > > > For the last seven years, I have used IIS and basic authentication to > log in to our intranet web site. We tied in to Active Directory for > the user database. > > Now, we are building a new online admission application where the > applicants will not yet have an Active Directory account. Therefore, > it will be a simple form -> DB check process. Once the user is > authenticated, they will stay logged-in until they close their browser. > In other words, some of the forms may be considerable in length and we > don't want to lose a session in the midst of completing a form. > > It's been years since I built a form-based authentication system. > > I have no problem confirming the credentials, but I'm fuzzy when it > comes to keeping the user logged-in. I know I need to create a > browser-based session cookie that will expire when the browser is > closed. However, what will go in that cookie? > > The credentials are an email address and a security token. > > I can see a few ways of handling this: > 1. Encrypt the credentials and store in the cookie. Then, decrypt the > values each time another page is requested. > 2. Create a UID and store that in the cookie. In addition, that UID > would also be stored in the user's record on the DB. On each request, > I would compare the cookie to the DB and then return that user's > information. > > Or, should I use a CF session and have the browser do a regular > heartbeat to keep the session active? > > Thanks for any suggestions. > > Mike > > > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323523 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Case Sensitive SQL
Lol you said MS Access and GREAT in the same sentence. .:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com http://cf4em.com -Original Message- From: Claude Schneegans [mailto:schneeg...@internetique.com] Sent: Saturday, June 13, 2009 1:15 PM To: cf-talk Subject: Re: Case Sensitive SQL >>Microsoft Access is terrible. Well, yet another legendary Access database bashing :-( Access database are GREAT for any small/medium web application. Most databases implement the string comparison to be case insensitive by default. They also have provisions to change it either globally or locally, and COLLATE is just one of them, not the simplest one. In Access, there is a very simple solution : the StrComp() function In your case, try WHERE strComp(password, '#from.passWord#', 0) = 0 Parameter 0 stands for "binary compare", 1 would be for case insensitve compare ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323524 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Cfthread bug with sandboxing
On our CF8.01 servers we've noticed a bug with cfthread and sandboxing. Threads don't get the same permissions as the code that launched them; any action like a DB call, a file read etc taken inside a thread fails with sandbox related errors. The exception to this is the first page to call threads after a server restart; those threads get the right permissions and everything works. After this, when pages in other sandboxes try to run threads, problems occur for those other sandboxes (the first one continues to work). It's essentially first come first served, which is why I think it's a bug and not a feature. Has anyone else seen this problem? We're on SLES 10, CF Enterprise Multiserver (i.e. JRun). mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323525 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4