Re: [WebDNA] Search question
This WebDNA talk-list message is from 2012
It keeps the original formatting.
numero = 108873
interpreted = N
texte = Thanks very much for the help, I'll have a play around.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=3DSteve Craig - Asylum Interactive LtdTel +44 1330 860550 Fax +44 1330 860880=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=3Dhttp://www.asylumweb.comEmail: steve@asylumweb.comSkype: s.craig - iChat: steve.craig=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=3DOn 20 Mar 2012, at 12:38, Toby Cox wrote:> Then in which case I can think of the following options:>=20> 1. Do as you said initially - a long query string>=20> 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>=20> 3. Use the group functionality below, but us webdna to loop through =the results to get your desired results:>=20> eg=20>=20> [search .... ]> [founditems]> [if (("[T_Bioenergy]"=3D"F")&("[T_investment]"=3D"F)&....etc....)]> [!][/!]> [/if]> [/founditems]> [/search]>=20>=20> 4. Shorten your typing by setting an array>=20> [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]>=20>=20> 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.>=20> 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>=20>=20> There may be a better way, but I can't think of one right now....>=20>=20>=20> TC>=20>=20> On 20 Mar 2012, at 11:42, Steve Craig wrote:>=20>> 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>=20> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list
.> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us
Associated Messages, from the most recent to the oldest:
Thanks very much for the help, I'll have a play around.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=3DSteve Craig - Asylum Interactive LtdTel +44 1330 860550 Fax +44 1330 860880=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=3Dhttp://www.asylumweb.comEmail: steve@asylumweb.comSkype: s.craig - iChat: steve.craig=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=3DOn 20 Mar 2012, at 12:38, Toby Cox wrote:> Then in which case I can think of the following options:>=20> 1. Do as you said initially - a long query string>=20> 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>=20> 3. Use the group functionality below, but us webdna to loop through =the results to get your desired results:>=20> eg=20>=20> [search .... ]> [founditems]> [if (("[T_Bioenergy]"=3D"F")&("[T_investment]"=3D"F)&....etc....)]> [!][/!]> [/if]> [/founditems]> [/search]>=20>=20> 4. Shorten your typing by setting an array>=20> [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]>=20>=20> 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.>=20> 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>=20>=20> There may be a better way, but I can't think of one right now....>=20>=20>=20> TC>=20>=20> On 20 Mar 2012, at 11:42, Steve Craig wrote:>=20>> 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>=20> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us
Steve Craig
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:
RequiredFields template (1997)
Dealing with da back button (1999)
[Case] on OS X (2000)
[WebDNA] [BULK] Securing WebCatalog login (2017)
Visitor info (2000)
WebCatalog and WebMerchant reviewed by InfoWorld (1997)
[HIDEIF] inside [FOUNDITEM] (1997)
2nd WebCatalog2 Feature Request (1996)
Help! WebCat2 bug (1997)
possible, WebCat2.0 and checkboxes-restated (1997)
Dynamic Weather for my website - XML? (1999)
[WebDNA] [OT]Oracle to Buy Sun (2009)
Setting up shop (1997)
Dates (1998)
t or f (1997)
user flush db (2002)
Running subtotal? (1998)
E-mailer error codes (1997)
Getting Emailer to send mail (1997)
re:check boxes (1997)