Re: can you use [middle] in a search?

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 37742
interpreted = N
texte = OK, let's back up here.[listwords] is used to break the email up into it's separate components, which are username and domain.Then you'll use a new concept, grouped fields, to sort your search results.So let's say you have a .db with a bunch of email addresses. You'll need to break these email down into usernames and domains. You might create a second db for this purpose, that'd look something like this:name domain emailjoe doofus.com joe@doofus.combob doofus.com bob@doofus.comlarry stooges.com larry@stooges.commoe stooges.com moe@stooges.comcurly stooges.com curly@stooges.comYou would create this by performing a [listwords] on your original db like so:[search db=emails.db&neemaildata=[blank]] [founditems] [append db=domains.db]name=[listwords words=[email]&delimiters=@][showif [index]=1][word][/showif][/listwords]&domain=[listwords words=[email]&delimiters=@][showif [index]=2][word][/showif][/listwords]&email=[email][/[/append]OK, so now you have a db with three fields: name, domain and email. So, we can now sort this data with grouped fields like so:[search db=new.db&neemaildata=[blank]&group1field=name&group2field=domain&asgroup1so rt=2&asgroup2sort=1]Notice that group2 (domain) has been assigned a sort rank of 1, and that group 2 (name) has been assigned a sort rank of 2. This means that the search will sort results by domain first, and then by name within the domains.(A personal note of gratitude to Ken Grome for having the sublime patience to explain grouped fields to me several years ago! )HTH, you may see the above db sorted thusly at http://www.novaderm.com/test/testsorter.tplWill Starck NovaDerm skin care science http://www.novaderm.com support@novaderm.com 800-378-1740 ----- Original Message ----- From: Tim Robinson To: WebCatalog Talk Sent: Wednesday, August 08, 2001 11:59 PM Subject: Re: can you use [middle] in a search? Hi Will,Thanks for that. I didn't know about [ListWords]. Sorry to appear like a total dufus (is that how you spell that?), but how does this pertain to the search results?This:[search db=Email.db&SKUsort=1&SKUsdir=as&geSKUdata=0&startat=[url][startat][/url]] [founditems] [/founditems]
EMAIL ADDRESS
[ListWords Words=[emailaddress]&Delimiters=@][showif [index]=1][word][/showif][/ListWords]@[ListWords Words=[emailaddress]&Delimiters=@][showif [index]=2][word][/showif][/ListWords]
[/search]brings up the same result as I had before, just done with [listwords] as opposed to straight from the database. How can I incorporate that into a search so it lists the domain half of the email address alphabetically?Apologies in advance for any ignorance on my part. Thanks in advance too!!Regards, TimTim Robinson Art Director imagine online tim@imagine.com.au http://www.imagine.com.au On Thursday, 9 August 2001 2:22 PM, Will Starck wrote: >Listwords is great for this: > >[listwords words=[email]&delimeters=@][word][/listwords] > >You can take the email addresses apart, sort them however you wish and then >put 'em back together like so: > >[listwords words=[email]&delimeters=@][showif >[index]=1][word][/showif][/listwords]@[listwords >words=[email]&delimeters=@][showif >[index]=2][word][/showif][/listwords] > >Will Starck >NovaDerm >skin care science >http://www.novaderm.com >-techs@novaderm.com >800-378-1740 >800-378-1740 > >----- Original Message ----- >From: Tim Robinson >To: WebCatalog Talk >Sent: Wednesday, August 08, 2001 9:44 PM >Subject: can you use [middle] in a search? > > >I'm creating a db of email addresses. When they are listed, it would be >really helpful to list them alphatecially determined by domain name, then >user. > >eg. >bob@alpha.com >chris@alpha.com >dave@alpha.com >bob@beta.com >chris@beta.com >dave@beta.com >bob@christmas.com >chris@christmas.com >dave@christmas.com >etc > >[middle] seems to be made for this (as you could use 'StartAfter=@'), but >how can I use this when displaying a list of search results? > >[getchars] obviously can't work because the username if of different >lengths. > >All help greatly appreciated. > >Regards, >Tim > >Tim Robinson >Art Director >imagine online >tim@imagine.com.au >http://www.imagine.com.au > > > >------------------------------------------------------------- >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/ > > > >------------------------------------------------------------- >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/ >------------------------------------------------------------- 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/ ------------------------------------------------------------- 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: can you use [middle] in a search? (Tim Robinson 2001)
  2. Re: can you use [middle] in a search? (John Peacock 2001)
  3. Re: can you use [middle] in a search? (Will Starck 2001)
  4. Re: can you use [middle] in a search? (Tim Robinson 2001)
  5. Re: can you use [middle] in a search? (Kenneth Grome 2001)
  6. Re: can you use [middle] in a search? (Tim Robinson 2001)
  7. Re: can you use [middle] in a search? (Will Starck 2001)
  8. can you use [middle] in a search? (Tim Robinson 2001)
OK, let's back up here.[listwords] is used to break the email up into it's separate components, which are username and domain.Then you'll use a new concept, grouped fields, to sort your search results.So let's say you have a .db with a bunch of email addresses. You'll need to break these email down into usernames and domains. You might create a second db for this purpose, that'd look something like this:name domain emailjoe doofus.com joe@doofus.combob doofus.com bob@doofus.comlarry stooges.com larry@stooges.commoe stooges.com moe@stooges.comcurly stooges.com curly@stooges.comYou would create this by performing a [listwords] on your original db like so:[search db=emails.db&neemaildata=[blank]] [founditems] [append db=domains.db]name=[listwords words=[email]&delimiters=@][showif [index]=1][word][/showif][/listwords]&domain=[listwords words=[email]&delimiters=@][showif [index]=2][word][/showif][/listwords]&email=[email][/[/append]OK, so now you have a db with three fields: name, domain and email. So, we can now sort this data with grouped fields like so:[search db=new.db&neemaildata=[blank]&group1field=name&group2field=domain&asgroup1so rt=2&asgroup2sort=1]Notice that group2 (domain) has been assigned a sort rank of 1, and that group 2 (name) has been assigned a sort rank of 2. This means that the search will sort results by domain first, and then by name within the domains.(A personal note of gratitude to Ken Grome for having the sublime patience to explain grouped fields to me several years ago! )HTH, you may see the above db sorted thusly at http://www.novaderm.com/test/testsorter.tplWill Starck NovaDerm skin care science http://www.novaderm.com support@novaderm.com 800-378-1740 ----- Original Message ----- From: Tim Robinson To: WebCatalog Talk Sent: Wednesday, August 08, 2001 11:59 PM Subject: Re: can you use [middle] in a search? Hi Will,Thanks for that. I didn't know about [listwords]. Sorry to appear like a total dufus (is that how you spell that?), but how does this pertain to the search results?This:[search db=Email.db&SKUsort=1&SKUsdir=as&geSKUdata=0&startat=[url][startat][/url]] [founditems] [/founditems]
EMAIL ADDRESS
[ListWords Words=[emailaddress]&Delimiters=@][showif [index]=1][word][/showif][/ListWords]@[ListWords Words=[emailaddress]&Delimiters=@][showif [index]=2][word][/showif][/ListWords]
[/search]brings up the same result as I had before, just done with [listwords] as opposed to straight from the database. How can I incorporate that into a search so it lists the domain half of the email address alphabetically?Apologies in advance for any ignorance on my part. Thanks in advance too!!Regards, TimTim Robinson Art Director imagine online tim@imagine.com.au http://www.imagine.com.au On Thursday, 9 August 2001 2:22 PM, Will Starck wrote: >Listwords is great for this: > >[listwords words=[email]&delimeters=@][word][/listwords] > >You can take the email addresses apart, sort them however you wish and then >put 'em back together like so: > >[listwords words=[email]&delimeters=@][showif >[index]=1][word][/showif][/listwords]@[listwords >words=[email]&delimeters=@][showif >[index]=2][word][/showif][/listwords] > >Will Starck >NovaDerm >skin care science >http://www.novaderm.com >-techs@novaderm.com >800-378-1740 >800-378-1740 > >----- Original Message ----- >From: Tim Robinson >To: WebCatalog Talk >Sent: Wednesday, August 08, 2001 9:44 PM >Subject: can you use [middle] in a search? > > >I'm creating a db of email addresses. When they are listed, it would be >really helpful to list them alphatecially determined by domain name, then >user. > >eg. >bob@alpha.com >chris@alpha.com >dave@alpha.com >bob@beta.com >chris@beta.com >dave@beta.com >bob@christmas.com >chris@christmas.com >dave@christmas.com >etc > >[middle] seems to be made for this (as you could use 'StartAfter=@'), but >how can I use this when displaying a list of search results? > >[getchars] obviously can't work because the username if of different >lengths. > >All help greatly appreciated. > >Regards, >Tim > >Tim Robinson >Art Director >imagine online >tim@imagine.com.au >http://www.imagine.com.au > > > >------------------------------------------------------------- >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/ > > > >------------------------------------------------------------- >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/ >------------------------------------------------------------- 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/ ------------------------------------------------------------- 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/ Will Starck

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:

CMSBuilder (2004) notification solutions (1997) Configuring E-mail (1997) Stats (2004) [WebDNA] grep again (2010) WebCat2: Items xx to xx shown, etc. (1997) WebCat b13 CGI -shownext- (1997) emailer w/F2 (1997) SSL, WebSTAR, WebCatalog (1998) Date Comparison (1998) Email Set-Up? (1997) [ConvertChars] problem (1997) Multiple Currencies (2002) WebCat2b15MacPlugin - [protect] (1997) Is Webcatalog 2.1 NT Ready? (1998) Format of Required fields error message (1997) Now you see it now you donīt (1997) FEW QUESTIONS (1997) need to delete a database remotely (2000) PCS Frames (1997)