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

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 37769
interpreted = N
texte = Hi Will,Thanks very much for that! I've got it to work. I've adapted it so it does a lot more. It's now writing to two databases where necessary, and this includes making adjustments for amending and deleting records... But I had to allow the option for our client to upload a whole new database of email addresses, so this means I've added a check for numFound between the two databases, and if they don't match, it deletes all records in the second one and recomplies it for the search result. I'm pretty happy with the outcome!Thanks again.Regards, TimTim Robinson Art Director imagine online tim@imagine.com.au http://www.imagine.com.au On Friday, 10 August 2001 12:45 AM, Will Starck wrote: >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 email > >joe doofus.com joe@doofus.com > >bob doofus.com bob@doofus.com > >larry stooges.com larry@stooges.com > >moe stooges.com moe@stooges.com > >curly stooges.com curly@stooges.com > >You 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.tpl > >Will 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, >Tim > >Tim 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/ >------------------------------------------------------------- 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)
Hi Will,Thanks very much for that! I've got it to work. I've adapted it so it does a lot more. It's now writing to two databases where necessary, and this includes making adjustments for amending and deleting records... But I had to allow the option for our client to upload a whole new database of email addresses, so this means I've added a check for numFound between the two databases, and if they don't match, it deletes all records in the second one and recomplies it for the search result. I'm pretty happy with the outcome!Thanks again.Regards, TimTim Robinson Art Director imagine online tim@imagine.com.au http://www.imagine.com.au On Friday, 10 August 2001 12:45 AM, Will Starck wrote: >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 email > >joe doofus.com joe@doofus.com > >bob doofus.com bob@doofus.com > >larry stooges.com larry@stooges.com > >moe stooges.com moe@stooges.com > >curly stooges.com curly@stooges.com > >You 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.tpl > >Will 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, >Tim > >Tim 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/ >------------------------------------------------------------- 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/ Tim Robinson

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:

date formatting for CC card expiration date check (1998) New Beta Documentation (1997) converting tabs (1997) Truncated value after space - refresh my memory.... (1997) Search returns all, not 20 (1997) Searching for (field1 OR field2) AND field3 (2000) return two fields w/ [lookup] (1998) WCS Newbie question (1997) Re:Emailer and encryption (1997) SetLineItem (1997) test (2000) Use of Back and Reload Buttons on ShoppingCart page? (1997) carriage returns in data (1997) setitems, one more thing (1997) Hyperlink in email (2002) eMailer replacement? (1998) [append] (1997) [WebDNA] Foreign characters (2009) (2009) rounding onlu UP (2002) Closing db's & caching templates (was: Shippingcalculations) (1997)