Re: search for non-unique question

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 40357
interpreted = N
texte = You've gotta keep reading beyond the lines you commented on and see what happens the next time through the loop...After the [/showif], the value of lastNickName is changed to the nickname in the current record. The next pass through the [founditems] loop, lastNickName is equal to the nickname from the previous record. If it matches the nickname in the new record, then we have a duplicate. This will find all the duplicates because we sorted the records by nickname, so all matching records will be grouped together.Walking through the example... Given the following nicknames (after sorting):alice bob bob fredThe first pass through, the showif resolves to [showif alice=] which is false, so no duplicate. Set lastnickname to alice.The second pass through, the showif resolves to [showif bob=alice] which is false, so no duplicate. Set lastnickname to bob.The third pass through, the showif resolves to [showif bob=bob] which is true, so bob is a duplicate - report it, change it, or whatever you need to do. Set lastnickname to bob (again).The fourth pass through, the showif resolves to [showif fred=bob] which is false, so no duplicate. Set lastnickname to fred.Make sense now?- BrianAt 6:28 PM -0800 11/26/2001, Aaron Lynch wrote: >This makes no sense to me: > > >On 11/26/01 9:15 AM, Brian Fries mashed the following keys : > >> Faster than doing 10,000 searches: >> >> [text]lastNickName=[/text] > >OK, so now lastNickName = '' > >> [search >> db=database.db&neNickNamedata=[blank]&allhit=1&asNickNamesort=1][founditems] > >OK, you just did a search, with 10,000 results... > >> [showif [url][NickName][/url]=[url][lastNickName][/url]] > >If 'nick'='' ?? This will only tell you if it's blank, which it won't be >cuz you are searching for non blank entries. > > >> ** [NickName] ** is duplicated >> [/showif] >> [text]lastNickName=[NickName][/text]The above line now sets lastNickName to the NickName in the currently found record. The next time> > [/founditems][/search] >> >> - brian >> >> At 11:54 AM +0000 11/24/2001, Dale Therio wrote: >>> WebCatalog 3.0.7 on Mac OS >>> >>> Hello, >>> >>> I have a database with about 10,000 records in it. I need to do a >>> search on a specific field (nickname) and find all records that have >>> more than one match. >>> >>> What I am doing is trying to take an existing field and eventually >>> make the value in that field a unique value, so in order to do that >>> I need to find all records where there is a conflict and notify >>> those users that they will need to change their nickname. >>> >>> Got any ideas on how to construct such a search? >>> >>> Oh, and many of the records currently have this field blank, I will >>> deal with those users as a seperate case. >>> >>> Thanks for any suggestions. >>> >>> Dale > >>------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: search for non-unique question (Brian Fries 2001)
  2. Re: search for non-unique question (Aaron Lynch 2001)
  3. Re: search for non-unique question (Brian Fries 2001)
  4. Re: search for non-unique question (Peter Werno 2001)
  5. Re: search for non-unique question (Dale Therio 2001)
  6. Re: search for non-unique question (Aaron Lynch 2001)
  7. Re: search for non-unique question (Marc@lsaproofing.com 2001)
  8. Re: search for non-unique question (Aaron Lynch 2001)
  9. search for non-unique question (Dale Therio 2001)
You've gotta keep reading beyond the lines you commented on and see what happens the next time through the loop...After the [/showif], the value of lastNickName is changed to the nickname in the current record. The next pass through the [founditems] loop, lastNickName is equal to the nickname from the previous record. If it matches the nickname in the new record, then we have a duplicate. This will find all the duplicates because we sorted the records by nickname, so all matching records will be grouped together.Walking through the example... Given the following nicknames (after sorting):alice bob bob fredThe first pass through, the showif resolves to [showif alice=] which is false, so no duplicate. Set lastnickname to alice.The second pass through, the showif resolves to [showif bob=alice] which is false, so no duplicate. Set lastnickname to bob.The third pass through, the showif resolves to [showif bob=bob] which is true, so bob is a duplicate - report it, change it, or whatever you need to do. Set lastnickname to bob (again).The fourth pass through, the showif resolves to [showif fred=bob] which is false, so no duplicate. Set lastnickname to fred.Make sense now?- BrianAt 6:28 PM -0800 11/26/2001, Aaron Lynch wrote: >This makes no sense to me: > > >On 11/26/01 9:15 AM, Brian Fries mashed the following keys : > >> Faster than doing 10,000 searches: >> >> [text]lastNickName=[/text] > >OK, so now lastNickName = '' > >> [search >> db=database.db&neNickNamedata=[blank]&allhit=1&asNickNamesort=1][founditems] > >OK, you just did a search, with 10,000 results... > >> [showif [url][NickName][/url]=[url][lastNickName][/url]] > >If 'nick'='' ?? This will only tell you if it's blank, which it won't be >cuz you are searching for non blank entries. > > >> ** [NickName] ** is duplicated >> [/showif] >> [text]lastNickName=[NickName][/text]The above line now sets lastNickName to the NickName in the currently found record. The next time> > [/founditems][/search] >> >> - brian >> >> At 11:54 AM +0000 11/24/2001, Dale Therio wrote: >>> WebCatalog 3.0.7 on Mac OS >>> >>> Hello, >>> >>> I have a database with about 10,000 records in it. I need to do a >>> search on a specific field (nickname) and find all records that have >>> more than one match. >>> >>> What I am doing is trying to take an existing field and eventually >>> make the value in that field a unique value, so in order to do that >>> I need to find all records where there is a conflict and notify >>> those users that they will need to change their nickname. >>> >>> Got any ideas on how to construct such a search? >>> >>> Oh, and many of the records currently have this field blank, I will >>> deal with those users as a seperate case. >>> >>> Thanks for any suggestions. >>> >>> Dale > >>------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Brian Fries

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Passing Variable (was How to add product size) (1997) Whats going on with my SERIAL NUMBER??? (1998) WebDelivery downloads alias, not original ? (1997) Cannot calculate prices (1997) WebCat b13 CGI -shownext- (1997) Another question about credit cards (1997) Webten + Webcat running smooth (1998) Here's how to kill a Butler Database. (1997) [WebDNA] Send results to more pages? (2011) Use of & in text areas.... (1998) SendMail - Idea (2000) international time (1997) writefile and texte (1997) RE: Multithreading of [replace] (1999) WebCatalog Mac 2.1b3 (1997) Which GUI HTML editors work with WC ? (1997) Stumpted Again (1997) [OT] Dedicated Image Uploader/Server [/OT] (2003) question: webmerchant connection (1997) Help! WebCat2 bug (1997)