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:

WebCat2 several catalogs? (1997) Shopping cart problem (2003) TaxTotal Problem (1997) RE: WebCatalog2 for NT Beta Request (1997) cart ID (1998) RE: Error -108 (1997) [ShowIf] and empty fields (1997) Caching [include] files ... (1997) [WebDNA] why is the webdna.us site slow? (sometimes?) (2011) Re:Call For Entry: Third Annual Business on The Internet (BOTI) Awards (1999) Need formatting help (1998) Setting up WebCatalog with Retail Pro data (1996) File Upload (1997) Ampersands in database fields? (1998) bug in [SendMail] (1997) Credit Card Checksum (1997) How can I record purchases to a database? (1998) webmerchant redialing (1998) PSC recommends what date format yr 2000??? (1997) Monitoring Script (2008)