Re: Compare Two Lists

2013-07-17 Thread Cameron Childress
On Wed, Jul 17, 2013 at 5:09 PM, Mark A Kruger wrote: > That's one of the reasons that I USE cfqueryparam - to keep me from having > to write list code :) Agreed. It's rare that I recommend against cfqueryparam, but in this case I think it might be easier. -Cameron ~~

RE: Compare Two Lists

2013-07-17 Thread Mark A Kruger
write list code :) -Mark -Original Message- From: Cameron Childress [mailto:camer...@gmail.com] Sent: Wednesday, July 17, 2013 2:10 PM To: cf-talk Subject: Re: Compare Two Lists Depending on where this CSV file is coming from, I'd just not use cfqueryparam. The only real reason to use it in a

Re: Compare Two Lists

2013-07-17 Thread Cameron Childress
Depending on where this CSV file is coming from, I'd just not use cfqueryparam. The only real reason to use it in a case like this is to make sure nobody's SQL injecting you. If this is an automated process and you think maybe one day you might not be able to trust the inputs form the CVS file, th

Re: Compare Two Lists

2013-07-17 Thread Jeff Garza
From: "i...@markleder.com i...@markleder.com" > Sent: Wednesday, July 17, 2013 12:01 PM > To: "cf-talk" > Subject: Re: Compare Two Lists > > FWIW: I have 4000 records to delete, with CF 9, throws an error: > [Macromedia][SQLServer JDBC Driver][SQLServer]The

Re: Compare Two Lists

2013-07-17 Thread i...@markleder.com i...@markleder.com
FWIW: I have 4000 records to delete, with CF 9, throws an error: [Macromedia][SQLServer JDBC Driver][SQLServer]The incoming request has too many parameters. The server supports a maximum of 2100 parameters. Reduce the number of parameters and resend the request. I can break up the routines int

RE: Compare Two Lists

2013-07-17 Thread Mark A Kruger
: Wednesday, July 17, 2013 10:08 AM To: cf-talk Subject: Re: Compare Two Lists Sure seems like I make things more complicated than they need to be. If the simple delete statement as you show will drop out the 4000 records without looping, then great

Re: Compare Two Lists

2013-07-17 Thread i...@markleder.com i...@markleder.com
Sure seems like I make things more complicated than they need to be. If the simple delete statement as you show will drop out the 4000 records without looping, then great! ~| Order the Adobe Coldfusion Anthology now! http://w

RE: Compare Two Lists

2013-07-17 Thread Mark A Kruger
Mark, Perhaps I'm missing something... but it seems like you already have your list to delete. Why are you comparing again? Why not just do: DELETE FROM someDBTable WHERE emailaddress IN ('# todelete#') Using cfqueryparam of course :) Is the list too large? Sometimes the driver will only han

OUTCOME: Re: Compare two lists and if one element common ... -

2007-04-16 Thread Mike Kear
Thanks Jim for your suggestions. Its a bit late in the day for this project to redesign the whole user authentication/access/permission control architecture,but i have another project starting in a couple of weeks and ill take a good look at what you've done for that one. I am grateful for you inp

RE: Compare two lists and if one element common ...

2007-04-16 Thread Andy Matthews
Use ListToArray, then use the built in .contains() method from Java. [SNIP] 3. Search : I have heard people complaining that there is no find method in Array. Actually you had it all the time. Just that it was hidden :) You can use List.Contains() or List.indexOf() methods to achieve that. Here is

OUTCOME: Re: Compare two lists and if one element common ... -

2007-04-15 Thread Mike Kear
Thanks Jim for your suggestions. Its a bit late in the day for this project to redesign the whole user authentication/access/permission control architecture,but i have another project starting in a couple of weeks and ill take a good look at what you've done for that one. I am grateful for you inp

RE: Compare two lists and if one element common ...

2007-04-15 Thread Jim Davis
> -Original Message- > From: Mike Kear [mailto:[EMAIL PROTECTED] > Sent: Sunday, April 15, 2007 3:20 AM > To: CF-Talk > Subject: Compare two lists and if one element common ... > > Is there an easy way to compare two lists and if there is at least one > common value then .. do something? >

Re: Compare two lists and if one element common ...

2007-04-15 Thread Sean Corfield
On 4/15/07, Mike Kear <[EMAIL PROTECTED]> wrote: > > > > > > > > > > This all seems a bit clumsy to me but it will work. Actually, no it won't. OkToGo will always end up set to the result of searching for the *last* user permission. You need to add the following,

Re: Compare two lists and if one element common ...

2007-04-15 Thread Andrew Scott
Mike, Thats why your own IsUserInRole() would be the way to go. That way you can break out of the loop and return true or false, so then this will work for you Allowed Not allowed On 4/15/07, Mike Kear <[EMAIL PROTECTED]> wrote: > > I have done my own. There are lots of reasons why the

Re: Compare two lists and if one element common ...

2007-04-15 Thread Jochem van Dieten
Mike Kear wrote: > Is there an easy way to compare two lists and if there is at least one > common value then .. do something? cflib has a listcompare function. Jochem ~| Deploy Web Applications Quickly across the enterprise wit

Re: Compare two lists and if one element common ...

2007-04-15 Thread Mike Kear
I have done my own. There are lots of reasons why the cflogin system was not appropriate for this site, but most was that the CFLOGIN is too one-size-fits-all for the organisation. I have already built the security on this site - it's been in place for 18 months now but i need to improve the way

Re: Compare two lists and if one element common ...

2007-04-15 Thread Andrew Scott
Mike, thats the only method in CF that is the simplest without doing your own IsUserInRole()... On 4/15/07, Mike Kear <[EMAIL PROTECTED]> wrote: > > Yes i do know about IsUserInRole, but as i explained in my question i > need a much more granular kind of permission set. > > And anyway i'm not

Re: Compare two lists and if one element common ...

2007-04-15 Thread Mike Kear
Yes i do know about IsUserInRole, but as i explained in my question i need a much more granular kind of permission set. And anyway i'm not using the CFLOGIN system for a variety of reasons. So yes i do know about it, but in this case I can't use it. Cheers Mike Kear Windsor, NSW, Australia Adobe

Re: Compare two lists and if one element common ...

2007-04-15 Thread Andrew Scott
Mike Kear, He who is an Adobe Certified Advanced Coldfusion Devleoper, doesn't know about IsUserInRole(userPermissions,"admin,contentAuthor"); hehe On 4/15/07, Mike Kear <[EMAIL PROTECTED]> wrote: > > Is there an easy way to compare two lists and if there is at least one > common value then ..

Re: Compare Two Lists - Keep What Is Similar

2002-12-17 Thread Zac Spitzer
Scott Brady wrote: >> Hi everyone. I am looking for a way to compare 2 different lists of >> information, and after comparing them keep which records are >> exactly the same. > > > I'd probably convert them both to arrays. Then, I'd loop along the > first array and look for each element within t

Re: Compare Two Lists - Keep What Is Similar

2002-12-16 Thread Jeffry Houser
And you may also want to look at Two things to make note of. Arrays and structures are considered to be more efficient than lists. If you are going to have 500 list elements, I might question whether a list is the

RE: Compare Two Lists - Keep What Is Similar

2002-12-16 Thread Ben Doom
I would loop over the first list, checking to see if the second list contains it using listcontains(), and append it to a new list if there's a match. For 500 records or so, I imagine that the overhead typically involved in running a more efficient algorithm might not be worth it. However, if you

Re: Compare Two Lists - Keep What Is Similar

2002-12-16 Thread Jerry Johnson
1. Venn tag (http://devex.macromedia.com/developer/gallery/SearchResults.cfm?keywords=venn) 2. query of query Just some ways I've done this in the past Jerry Johnson >>> [EMAIL PROTECTED] 12/16/02 01:17PM >>> Hi everyone. I am looking for a way to compare 2 different lists of information, and

Re: Compare Two Lists - Keep What Is Similar

2002-12-16 Thread Scott Brady
>Hi everyone. I am looking for a way to compare 2 different lists of >information, and after comparing them keep which records are exactly the >same. I'd probably convert them both to arrays. Then, I'd loop along the first array and look for each element within the second array. If it exists in

RE: Compare Two Lists - Keep What Is Similar

2002-12-16 Thread Timothy Heald
Might not be exact but it should be close. Will probably be processor intensive on large lists. Tim -Original Message- From: Wurst, Keith D. [mailto:[EMAIL PROTECTED]] Sent: Monday, December 16, 2002 1:17 PM To: CF-Talk Subje