Re: [WebDNA] Search question

This WebDNA talk-list message is from

2012


It keeps the original formatting.
numero = 108872
interpreted = N
texte = Then in which case I can think of the following options: 1. Do as you said initially - a long query string 2. Add an extra field to the end called All_False which you update when = client uploads data. This update script contains your long search - = ...&eqT_Bioenergydatarq=3DF&eqT_investmentdatarq=3DF&eq.... - and after = the search you have [replacefounditems]All_False=3DT[/replacefounditems] = - then when searching the site you simply look for &eqAll_Falsedatarq=3DT 3. Use the group functionality below, but us webdna to loop through the = results to get your desired results: eg=20 [search .... ] [founditems] [if (("[T_Bioenergy]"=3D"F")&("[T_investment]"=3D"F)&....etc....)] [!][/!] [/if] [/founditems] [/search] 4. Shorten your typing by setting an array [arrayset = name=3Dsearchparams&dim=3D10](1)=3DT_Bioenergy&(2)=3DT_investment&....etc.= ..&[/arrayset] [search db=3D...&[loop = start=3D1&end=3D10]ne[searchparams([index])]datarq=3DT&[/loop]] ... stuff here... [/search] Bizarrely this is a difficult thing to achieve in any DB that I have = come across. It is only possible in MySQL with the CONCAT or = GROUP_CONCAT function of other set of nested queries. If you are trying to speed up the query time then I would go for option = 2 - add the grunt when putting data in. If you are trying to save on = typing / make it easier to change the query should you need, then = probably #4 There may be a better way, but I can't think of one right now.... TC On 20 Mar 2012, at 11:42, Steve Craig wrote: > Hi >=20 > I now have=20 >=20 > = &Group1field=3DT_Bioenergy+T_Investment+T_Jobs+T_Low_Carbon_Transport+T_Of= fshore_Main+T_Offshore_Wind+T_Onshore_Wind+T_Renewable_Heat+T_Smart_Energy= +T_Solar_Energy+T_Wave_Tidal&neGroup1datarq=3DT&asEXHIBITORNAMEsort=3D1 >=20 > as the search string only problem is I think it is returning any = record that doesn't have a T in any of the boxes. What I want is any = record that doesn't have a T in ALL the boxes. In other words a record = that has not been assigned to any of the sections. At the moment it is = returning everything as every record has at least one of these fields = empty. Hope that makes sense. >=20 > Any thoughts much appreciated. >=20 > Cheers > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Search question (frank@cwolfe.com 2013)
  2. Re: [WebDNA] Search question ("Terry Wilson" 2013)
  3. RE: [WebDNA] Search question ("Terry Nair" 2013)
  4. Re: [WebDNA] Search question (Lawrence Banahan 2013)
  5. [WebDNA] Search question (frank@cwolfe.com 2013)
  6. Re: [WebDNA] Search question (Steve Craig 2012)
  7. Re: [WebDNA] Search question (Toby Cox 2012)
  8. Re: [WebDNA] Search question (Steve Craig 2012)
  9. Re: [WebDNA] Search question (Steve Craig 2012)
  10. Re: [WebDNA] Search question (Toby Cox 2012)
  11. [WebDNA] Search question (Steve Craig 2012)
  12. Re: [WebDNA] SEARCH question - SHOWIF - HIDEIF question (Govinda 2011)
  13. Re: [WebDNA] SEARCH question - SHOWIF - HIDEIF question (Donovan Brooke 2011)
  14. Re: [WebDNA] SEARCH question - SHOWIF - HIDEIF question (Steve Raslevich -Northern Sound 2011)
  15. Re: [WebDNA] SEARCH question - SHOWIF - HIDEIF question (Kenneth Grome 2011)
  16. Re: [WebDNA] SEARCH question - SHOWIF - HIDEIF question (christophe.billiottet@webdna.us 2011)
  17. Re: [WebDNA] SEARCH question - SHOWIF - HIDEIF question (Govinda 2011)
  18. Re: [WebDNA] SEARCH question - SHOWIF - HIDEIF question (christophe.billiottet@webdna.us 2011)
  19. Re: [WebDNA] SEARCH question - SHOWIF - HIDEIF question (christophe.billiottet@webdna.us 2011)
  20. Re: [WebDNA] SEARCH question - SHOWIF - HIDEIF question (Govinda 2011)
  21. Re: [WebDNA] SEARCH question - SHOWIF - HIDEIF question (Donovan Brooke 2011)
  22. Re: [WebDNA] SEARCH question - SHOWIF - HIDEIF question (Steve Raslevich -Northern Sound 2011)
  23. Re: [WebDNA] SEARCH question (Stuart Tremain 2011)
  24. Re: [WebDNA] SEARCH question (Kenneth Grome 2011)
  25. Re: [WebDNA] SEARCH question (Donovan Brooke 2011)
  26. Re: [WebDNA] SEARCH question (christophe.billiottet@webdna.us 2011)
  27. Re: [WebDNA] SEARCH question (Govinda 2011)
  28. Re: [WebDNA] SEARCH question (Donovan Brooke 2011)
  29. Re: [WebDNA] SEARCH question (christophe.billiottet@webdna.us 2011)
  30. Re: [WebDNA] SEARCH question (Stuart Tremain 2011)
  31. Re: [WebDNA] SEARCH question (Steve Raslevich 2011)
  32. [WebDNA] SEARCH question (Stuart Tremain 2011)
  33. Re: [WebDNA] Search Question (Tony Miller 2009)
  34. Re: [WebDNA] Search Question (John Butler 2009)
  35. Re: [WebDNA] Search Question (Kenneth Grome 2009)
  36. Re: [WebDNA] Search Question (Tony Miller 2009)
  37. Re: [WebDNA] Search Question ( 2009)
  38. Re: [WebDNA] Search Question (Tony Miller 2009)
  39. Re: [WebDNA] Search Question (Kenneth Grome 2009)
  40. Re: [WebDNA] Search Question ( 2009)
  41. [WebDNA] Search Question (Tony Miller 2009)
Then in which case I can think of the following options: 1. Do as you said initially - a long query string 2. Add an extra field to the end called All_False which you update when = client uploads data. This update script contains your long search - = ...&eqT_Bioenergydatarq=3DF&eqT_investmentdatarq=3DF&eq.... - and after = the search you have [replacefounditems]All_False=3DT[/replacefounditems] = - then when searching the site you simply look for &eqAll_Falsedatarq=3DT 3. Use the group functionality below, but us webdna to loop through the = results to get your desired results: eg=20 [search .... ] [founditems] [if (("[T_Bioenergy]"=3D"F")&("[T_investment]"=3D"F)&....etc....)] [!][/!] [/if] [/founditems] [/search] 4. Shorten your typing by setting an array [arrayset = name=3Dsearchparams&dim=3D10](1)=3DT_Bioenergy&(2)=3DT_investment&....etc.= ..&[/arrayset] [search db=3D...&[loop = start=3D1&end=3D10]ne[searchparams([index])]datarq=3DT&[/loop]] ... stuff here... [/search] Bizarrely this is a difficult thing to achieve in any DB that I have = come across. It is only possible in MySQL with the CONCAT or = GROUP_CONCAT function of other set of nested queries. If you are trying to speed up the query time then I would go for option = 2 - add the grunt when putting data in. If you are trying to save on = typing / make it easier to change the query should you need, then = probably #4 There may be a better way, but I can't think of one right now.... TC On 20 Mar 2012, at 11:42, Steve Craig wrote: > Hi >=20 > I now have=20 >=20 > = &Group1field=3DT_Bioenergy+T_Investment+T_Jobs+T_Low_Carbon_Transport+T_Of= fshore_Main+T_Offshore_Wind+T_Onshore_Wind+T_Renewable_Heat+T_Smart_Energy= +T_Solar_Energy+T_Wave_Tidal&neGroup1datarq=3DT&asEXHIBITORNAMEsort=3D1 >=20 > as the search string only problem is I think it is returning any = record that doesn't have a T in any of the boxes. What I want is any = record that doesn't have a T in ALL the boxes. In other words a record = that has not been assigned to any of the sections. At the moment it is = returning everything as every record has at least one of these fields = empty. Hope that makes sense. >=20 > Any thoughts much appreciated. >=20 > Cheers > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Toby Cox

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:

Associative lookup style? + bit more (1997) affiliate marketing program (1998) Not really WebCat (1997) Showing unopened cart (1997) Wishlist;: Was Runtime version ... (2003) AppleScript question (1997) Webcatalog on MacOs (2000) What am I missing (1997) Internet Explorer 6 Form problems (2005) no [search] with NT (1997) Enhancement Request for WebCatalog-NT (1996) 3.0 [TEXT] variables (1998) [WebDNA] Apply discount using a line item (2011) 4.5.1 on Panther? (2004) passing variables - problem (1997) [random] only for 1-100??? (1997) RE: AccountAuthorizer doesn't seem to work (1997) [searchString] (1997) [WebDNA] Is a '.webdna' suffix better? (2008) Attention SMSI - DOCS Error (2004)