Re: Searching multiple records for certain info

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 30468
interpreted = N
texte = There were a couple of mistakes in my previous post.The corrected code is below. My thinking was to first off get a count of all the levels selected. Then for each userID increment the levelcount if he belongs to that selected level and in the end if the userID belongs to all the selected levels, put that userID in a table.Jai. >[math show=f] requiredlevelcount=0[/math] > >[showif [level1selected]=t][math show=f] >requiredleevlcount=requiredlevelcount+1[/math][/showif] > >[showif [level2selected]=t] [math show=f] >requiredleevlcount=requiredlevelcount+1[/math][/showif] > >... > >[showif [level10selected]=t] [math show=f] >requiredleevlcount=requiredlevelcount+1[/math][/showif] > > >[search db=yourdb.db&geuserIDdata=0] > > >[founditems] >[math show=f]user=[userID][/math] [math show=f]levelCount=0[/math] > >[showif [level1selected]=t][search db=yourdb.db&eqleveldatarq=1] >[Founditems][showif [userID]=[user]][math >show=f]levelcount=levelcount+1[/math] >[/showif][/founditems][/search][/showif] > >[showif [level2selected]=t][search db=yourdb.db&eqleveldatarq=2] >[Founditems][showif [userID]=[user]][math >show=f]levelcount=levelcount+1[/math] >[/showif][/founditems][/search][/showif] > >... > >[showif [level10selected]=t][search db=yourdb.db&eqleveldatarq=10] >[Founditems][showif [userID]=[user]][math >show=f]levelcount=levelcount+1[/math] >[/showif][/founditems][/search][/showif] > > >[showif [levelcount]=[requiredlevelcount]] >[/founditems] >
[userID]
>[/search] > > >>Ken, >> >>Thanks for the info. I didn't do a good job of explaining. We don't know how >>many of the levels we need to match before the search. The user can come to >>the website and choose from 1 to (at present) 10 different levels and they >>only want to 'find' users that have all of the levels they selected. >> >>I have suggested putting a field for the different levels in one record, but >>the others want to have a record for each level as we may be adding more >>levels as time goes on. >> >>Thank you! >> >>Dale >>-- >>Dale Therio >>+49 69 263 19977 office Dresdner Kleinwort Benson Research >>+49 69 263 11379 fax Jürgen-Ponto-Platz 1 >>+49 170 934 3610 mobile 60301 Frankfurt, Germany >> >> >> > From: Kenneth Grome >> > Reply-To: (WebCatalog Talk) >> > Date: Thu, 13 Apr 2000 22:57:43 -1000 >> > To: (WebCatalog Talk) >> > Subject: Re: Searching multiple records for certain info >> > >> >> WebCatalog 3.08 (Mac OS and WinNT) >> >> >> >> Hi folks, >> >> >> >> Database >> >> userID level >> >> 1 3 >> >> 1 5 >> >> 1 6 >> >> 2 3 >> >> 2 4 >> >> 2 5 >> >> 3 3 >> >> 3 4 >> >> 3 5 >> >> 3 6 >> >> >> >> We are trying to accomplish the following: >> >> >> >> Do a search and only return the userID of those users that have records >> >> containing multiple levels. e.g. search for all users that have >>level 3 and >> >> 4. which in the above example this would return users 2 and 3 only. >> >> >> >> Any ideas? >> > >> > >> > [search db=x.db&woleveldatarq=3] >> > [text]next=[founditems][userID],[/founditems][/text] >> > [/search] >> > >> > [search db=x.db&wouserIDdatarq=[next]&woleveldatarq=4] >> > [founditems] >> > the records you want are here ... >> > [/founditems] >> > [/search] >> > -- >> > ================================ >> > Kenneth Grome, WebDNA Consultant >> > 808-737-6499 http://webdna.net >> > ================================ >> > >> > >> > >> > ------------------------------------------------------------- >> > 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 >> > >> > >> >> >>------------------------------------------------------------- >>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 >> > >Jaishankar Jayaram, >Database Programmer, >Interactive Ink, Inc. >Phone: (614) 221-7089 ext 23 >Fax: (614) 221-7098 >Email:jai@interactiveink.com >http://www.interactiveink.com >E-business made Easy > >------------------------------------------------------------- >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 >Jaishankar Jayaram, Database Programmer, Interactive Ink, Inc. Phone: (614) 221-7089 ext 23 Fax: (614) 221-7098 Email:jai@interactiveink.com http://www.interactiveink.com E-business made Easy------------------------------------------------------------- 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 Associated Messages, from the most recent to the oldest:

    
  1. Re: Searching multiple records for certain info (Jaishankar Jayaram 2000)
  2. Re: Searching multiple records for certain info (Jaishankar Jayaram 2000)
  3. Re: Searching multiple records for certain info (Joseph D'Andrea 2000)
  4. Re: Searching multiple records for certain info (dale@gmr.dresdner.net 2000)
  5. Re: Searching multiple records for certain info (Kenneth Grome 2000)
  6. Searching multiple records for certain info (dale@gmr.dresdner.net 2000)
There were a couple of mistakes in my previous post.The corrected code is below. My thinking was to first off get a count of all the levels selected. Then for each userID increment the levelcount if he belongs to that selected level and in the end if the userID belongs to all the selected levels, put that userID in a table.Jai. >[math show=f] requiredlevelcount=0[/math] > >[showif [level1selected]=t][math show=f] >requiredleevlcount=requiredlevelcount+1[/math][/showif] > >[showif [level2selected]=t] [math show=f] >requiredleevlcount=requiredlevelcount+1[/math][/showif] > >... > >[showif [level10selected]=t] [math show=f] >requiredleevlcount=requiredlevelcount+1[/math][/showif] > > >[search db=yourdb.db&geuserIDdata=0] > > >[founditems] >[math show=f]user=[userID][/math] [math show=f]levelCount=0[/math] > >[showif [level1selected]=t][search db=yourdb.db&eqleveldatarq=1] >[founditems][showif [userID]=[user]][math >show=f]levelcount=levelcount+1[/math] >[/showif][/founditems][/search][/showif] > >[showif [level2selected]=t][search db=yourdb.db&eqleveldatarq=2] >[founditems][showif [userID]=[user]][math >show=f]levelcount=levelcount+1[/math] >[/showif][/founditems][/search][/showif] > >... > >[showif [level10selected]=t][search db=yourdb.db&eqleveldatarq=10] >[founditems][showif [userID]=[user]][math >show=f]levelcount=levelcount+1[/math] >[/showif][/founditems][/search][/showif] > > >[showif [levelcount]=[requiredlevelcount]] >[/founditems] >
[userID]
>[/search] > > >>Ken, >> >>Thanks for the info. I didn't do a good job of explaining. We don't know how >>many of the levels we need to match before the search. The user can come to >>the website and choose from 1 to (at present) 10 different levels and they >>only want to 'find' users that have all of the levels they selected. >> >>I have suggested putting a field for the different levels in one record, but >>the others want to have a record for each level as we may be adding more >>levels as time goes on. >> >>Thank you! >> >>Dale >>-- >>Dale Therio >>+49 69 263 19977 office Dresdner Kleinwort Benson Research >>+49 69 263 11379 fax Jürgen-Ponto-Platz 1 >>+49 170 934 3610 mobile 60301 Frankfurt, Germany >> >> >> > From: Kenneth Grome >> > Reply-To: (WebCatalog Talk) >> > Date: Thu, 13 Apr 2000 22:57:43 -1000 >> > To: (WebCatalog Talk) >> > Subject: Re: Searching multiple records for certain info >> > >> >> WebCatalog 3.08 (Mac OS and WinNT) >> >> >> >> Hi folks, >> >> >> >> Database >> >> userID level >> >> 1 3 >> >> 1 5 >> >> 1 6 >> >> 2 3 >> >> 2 4 >> >> 2 5 >> >> 3 3 >> >> 3 4 >> >> 3 5 >> >> 3 6 >> >> >> >> We are trying to accomplish the following: >> >> >> >> Do a search and only return the userID of those users that have records >> >> containing multiple levels. e.g. search for all users that have >>level 3 and >> >> 4. which in the above example this would return users 2 and 3 only. >> >> >> >> Any ideas? >> > >> > >> > [search db=x.db&woleveldatarq=3] >> > [text]next=[founditems][userID],[/founditems][/text] >> > [/search] >> > >> > [search db=x.db&wouserIDdatarq=[next]&woleveldatarq=4] >> > [founditems] >> > the records you want are here ... >> > [/founditems] >> > [/search] >> > -- >> > ================================ >> > Kenneth Grome, WebDNA Consultant >> > 808-737-6499 http://webdna.net >> > ================================ >> > >> > >> > >> > ------------------------------------------------------------- >> > 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 >> > >> > >> >> >>------------------------------------------------------------- >>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 >> > >Jaishankar Jayaram, >Database Programmer, >Interactive Ink, Inc. >Phone: (614) 221-7089 ext 23 >Fax: (614) 221-7098 >Email:jai@interactiveink.com >http://www.interactiveink.com >E-business made Easy > >------------------------------------------------------------- >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 >Jaishankar Jayaram, Database Programmer, Interactive Ink, Inc. Phone: (614) 221-7089 ext 23 Fax: (614) 221-7098 Email:jai@interactiveink.com http://www.interactiveink.com E-business made Easy------------------------------------------------------------- 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 Jaishankar Jayaram

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:

[WebDNA] 301 redirect (2010) Tiny Store / Checkboxes (1998) encryption in browser? (1998) Using the new syntax/scoping methods (2000) Search and Change (2003) [shownext] (1998) EIMS Problems (1997) Unstable on my server (2000) Talk List Suggestions (1997) WebCatalog and WebMerchant reviewed by InfoWorld (1997) Snake Bites (1997) How do you hide [math]stuff[/math] (1997) getmimeheader host on my local machine (2003) GuestBook example (1997) [ShowNext] feature in 2.0 (1997) 500 internal error? (2004) Emailer [cart] file names (1997) [WebDNA] Code Library (2013) preserving the zero's (1999) 3RD POST Character limit in [Search]? (1998)