Re: Searching Relational Databases

This WebDNA talk-list message is from

2004


It keeps the original formatting.
numero = 55642
interpreted = N
texte = I've since rendered my program to not deal with this issue anymore. I = think it will be usefull snippet for people looking for this functionality = in the future. Thanks again. Justin Carroll On Saturday, February 27, 1943, Alex McCombie = wrote: >On 1/8/04 2:56 PM, "Alex McCombie" >wrote: > >Justin,=20 >Just curious if this worked for you or got you started? >I still havent had time to really test it, but it seemed solid. > >Alex > > > >> On 1/8/04 2:13 PM, "Justin Carroll" = >> wrote: >>=20 >> Added a hideif to stop the duplicate entry on the secondary array when = the >> listwords index =3D 2 and the value is greater. >>=20 >> I cant get to testing this anytime soon. >>=20 >> Anyone else want to? >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>> We're using version 4.0.2 rc2 Thanks. >> Of course in this scenario this could be solved by adding a field to = the >> business.db that contains a updated total employee count that would be >> modified by the add/delete in the employee system.... >>=20 >> BUT, assuming that you cant do that or since this is just an example = you >> could use the following complex logic. >>=20 >> Search on the business.db on your criteria and return a results list = that >> just seeds your variables: >>=20 >>=20 >> [Text]Businessrank=3D[/text] >> [Text]Businesssku=3D[/text] >> [Text]Busrerank=3D[/text] >>=20 >> [search business.db&on something] >> [founditems] >> [text]indexvar=3D[index][/text] >>=20 >> [search db=3Demployee.db&eqbusiness_skudatarq=3D[sku]] >> [showif [indexvar]=3D1] >> [text]businessrank=3D[SKU]|[numfound]|[/text] >> [/showif] >>=20 >> [showif [indexvar]>1] >> [text]totalvar=3D[CountWords Delimiters=3D|][businessrank][/countwords][= /text] >> =20 >> [listwords words=3D[businessrank] Delimiters=3D|] >>=20 >> [showif [index]\2] >> [showif [numfound]>[word]] >> [text]busrerank=3D[sku]|numfound]|[busrerank][/text] >> [/showif] >> [showif [index]=3D[totalvar]] >> [hideif [numfound]>[word]] >> [text]busrerank=3D[busrerank]|[sku]|numfound]|[/text] >> [/hideif] >> [/showif] >> [/showif] >>=20 >> [/listwords] >>=20 >> [listwords words=3D[busrerank] Delimiters=3D|] >> [hideif [index]\2] >> [Text]Businesssku=3D[businesssku]|[word][/text] >> [/listwords] >>=20 >> [/founditems] >> [/search] >>=20 >>=20 >> [listwords words=3D[businesssku] Delimiters=3D|] >> [Lookup=20 >> db=3Dbusiness.db&value=3D[word]&lookInField=3Dsku&= returnField=3Dbusiness_name¬Fou >> nd=3D] >>=20 >> [/listwords] >>=20 >>=20 >>=20 >>=20 >>=20 >> I believe this is fairly solid. It should give you a variable with the = skus >> to the business.db sorted from largest to smallest which you could then = use >> to do the lookups in order. >>=20 >> Like I said, this is UNTESTED, but I believe the logic is fairly sound, = give >> or take a syntax error here or there... I just threw it together to get = us >> started. >>=20 >>=20 >> Anyone? >>=20 >>=20 >> Alex J McCombie New World Media >> Chief Information Officer Box 124 >> 888/892.6379 MartVille, NY 13111 >> Alex@NewWorldMedia.com http://OurClients.com >>=20 >> Interface Designer WebDNA Programmer Database Designer >>=20 >>=20 > > >Alex J McCombie New World Media >Chief Information Officer Box 124 >888/892.6379 MartVille, NY 13111 >Alex@NewWorldMedia.com =20 >http://OurClients.com > >Interface Designer WebDNA Programmer Database >Designer > > > >------------------------------------------------------------- >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://webdna.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://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Searching Relational Databases ( Justin Carroll 2004)
  2. Re: Searching Relational Databases ( Justin Carroll 2004)
  3. Re: Searching Relational Databases ( Alex McCombie 2004)
  4. Re: Searching Relational Databases ( Alex McCombie 2004)
  5. Re: Searching Relational Databases ( Alex McCombie 2004)
  6. Re: Searching Relational Databases ( Alex McCombie 2004)
  7. Re: Searching Relational Databases ( Marc Kaiwi 2004)
  8. Re: Searching Relational Databases ( Justin Carroll 2004)
  9. Re: Searching Relational Databases ( Alex McCombie 2004)
  10. Re: Searching Relational Databases ( Marc Kaiwi 2004)
  11. Re: Searching Relational Databases ( Marc Kaiwi 2004)
  12. Searching Relational Databases ( Justin Carroll 2004)
I've since rendered my program to not deal with this issue anymore. I = think it will be usefull snippet for people looking for this functionality = in the future. Thanks again. Justin Carroll On Saturday, February 27, 1943, Alex McCombie = wrote: >On 1/8/04 2:56 PM, "Alex McCombie" >wrote: > >Justin,=20 >Just curious if this worked for you or got you started? >I still havent had time to really test it, but it seemed solid. > >Alex > > > >> On 1/8/04 2:13 PM, "Justin Carroll" = >> wrote: >>=20 >> Added a hideif to stop the duplicate entry on the secondary array when = the >> listwords index =3D 2 and the value is greater. >>=20 >> I cant get to testing this anytime soon. >>=20 >> Anyone else want to? >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>> We're using version 4.0.2 rc2 Thanks. >> Of course in this scenario this could be solved by adding a field to = the >> business.db that contains a updated total employee count that would be >> modified by the add/delete in the employee system.... >>=20 >> BUT, assuming that you cant do that or since this is just an example = you >> could use the following complex logic. >>=20 >> Search on the business.db on your criteria and return a results list = that >> just seeds your variables: >>=20 >>=20 >> [text]Businessrank=3D[/text] >> [text]Businesssku=3D[/text] >> [text]Busrerank=3D[/text] >>=20 >> [search business.db&on something] >> [founditems] >> [text]indexvar=3D[index][/text] >>=20 >> [search db=3Demployee.db&eqbusiness_skudatarq=3D[sku]] >> [showif [indexvar]=3D1] >> [text]businessrank=3D[SKU]|[numfound]|[/text] >> [/showif] >>=20 >> [showif [indexvar]>1] >> [text]totalvar=3D[CountWords Delimiters=3D|][businessrank][/countwords][= /text] >> =20 >> [listwords words=3D[businessrank] Delimiters=3D|] >>=20 >> [showif [index]\2] >> [showif [numfound]>[word]] >> [text]busrerank=3D[sku]|numfound]|[busrerank][/text] >> [/showif] >> [showif [index]=3D[totalvar]] >> [hideif [numfound]>[word]] >> [text]busrerank=3D[busrerank]|[sku]|numfound]|[/text] >> [/hideif] >> [/showif] >> [/showif] >>=20 >> [/listwords] >>=20 >> [listwords words=3D[busrerank] Delimiters=3D|] >> [hideif [index]\2] >> [text]Businesssku=3D[businesssku]|[word][/text] >> [/listwords] >>=20 >> [/founditems] >> [/search] >>=20 >>=20 >> [listwords words=3D[businesssku] Delimiters=3D|] >> [Lookup=20 >> db=3Dbusiness.db&value=3D[word]&lookInField=3Dsku&= returnField=3Dbusiness_name¬Fou >> nd=3D] >>=20 >> [/listwords] >>=20 >>=20 >>=20 >>=20 >>=20 >> I believe this is fairly solid. It should give you a variable with the = skus >> to the business.db sorted from largest to smallest which you could then = use >> to do the lookups in order. >>=20 >> Like I said, this is UNTESTED, but I believe the logic is fairly sound, = give >> or take a syntax error here or there... I just threw it together to get = us >> started. >>=20 >>=20 >> Anyone? >>=20 >>=20 >> Alex J McCombie New World Media >> Chief Information Officer Box 124 >> 888/892.6379 MartVille, NY 13111 >> Alex@NewWorldMedia.com http://OurClients.com >>=20 >> Interface Designer WebDNA Programmer Database Designer >>=20 >>=20 > > >Alex J McCombie New World Media >Chief Information Officer Box 124 >888/892.6379 MartVille, NY 13111 >Alex@NewWorldMedia.com =20 >http://OurClients.com > >Interface Designer WebDNA Programmer Database >Designer > > > >------------------------------------------------------------- >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://webdna.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://webdna.smithmicro.com/ Justin Carroll

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:

bug in [SendMail] (1997) Hello??? (1997) Showing unopened cart (1997) Templates for Customer Database? (1997) Date problems-more (1997) WebDNA equivalent for $REQUEST_URI (2004) [Sum] function? (1997) WebCat2b13MacPlugIn - More limits on [include] (1997) Security (1999) Running _every_ page through WebCat-error.html (1997) [WebDNA] Downloadable docs (2011) [movefile] (1999) writefile and emailer (2002) Bug? (1997) SKU lookup (1997) What is this error message? (2006) RedHat 9 & WebCatalog 4.5 (2004) SQL Ref. (1999) Grant, please help me ... (1997) FORMS: Returning a specific page (1997)