Re: Search Philosophy
This WebDNA talk-list message is from 2001
It keeps the original formatting.
numero = 39366
interpreted = N
texte = >Hello, question from a confused designer....>In a basic search string similiar to:>>[search db=some.db&eqFIELDdatarq=var]>[founditems]>some action>[/founditems]>[/search]>>If one wants to enact an action on both the found>items that equal FIELD and that founditems that dont equal>FIELD does one need two search contexts?As I see it, there are two approaches to this,1. as you have discovered, 2 searches.2. search for ALL the records (neFIELDdatarq=[blank]) and use showif's and hideif's to make the difference[founditems][showif [field]=var][/showif][hideif [field]=var][/hideif][/founditems]Which approach you want to use depends on your situation, db size, performance issues, and so on. A little side by side comparison may be in order.Without knowing the rest of your code, I prefer to do something like #2:[search db=some.db&neFIELDdatarq=[blank]][founditems][showif [FIELD]=var][text]t_field=[var][/showif][hideif [FIELD]=var][text]t_field=something else[/hideif]More code using [t_field][/founditems][/search]You may also want to research [lookup] especially in relation to the notfound parameter.HTHs-Sam>>In otherwords, I want to change a variable to something>if it is found and something else if it is not found.>>thanks.>>>>>-- Donovan D. Brooke>Systems Administrator/>Assc. Art Director>Epsen Hillmer Graphics>>>I know I'm making progress when I look at the questions I have>asked in the past and think to myself... how stupid was that>>>------------------------------------------------------------->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:
>Hello, question from a confused designer....>In a basic search string similiar to:>>[search db=some.db&eqFIELDdatarq=var]>[founditems]>some action>[/founditems]>[/search]>>If one wants to enact an action on both the found>items that equal FIELD and that founditems that dont equal>FIELD does one need two search contexts?As I see it, there are two approaches to this,1. as you have discovered, 2 searches.2. search for ALL the records (neFIELDdatarq=[blank]) and use showif's and hideif's to make the difference[founditems][showif [field]=var][/showif][hideif [field]=var][/hideif][/founditems]Which approach you want to use depends on your situation, db size, performance issues, and so on. A little side by side comparison may be in order.Without knowing the rest of your code, I prefer to do something like #2:[search db=some.db&neFIELDdatarq=[blank]][founditems][showif [FIELD]=var][text]t_field=[var][/showif][hideif [FIELD]=var][text]t_field=something else[/hideif]More code using [t_field][/founditems][/search]You may also want to research [lookup] especially in relation to the notfound parameter.HTHs-Sam>>In otherwords, I want to change a variable to something>if it is found and something else if it is not found.>>thanks.>>>>>-- Donovan D. Brooke>Systems Administrator/>Assc. Art Director>Epsen Hillmer Graphics>>>I know I'm making progress when I look at the questions I have>asked in the past and think to myself... how stupid was that>>>------------------------------------------------------------->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/
Samuel Renkert
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] WebDNA receiving numerous signal SIGSEGV then crashing (2016)
psst (1997)
Languages (1997)
frames & carts (1997)
apparently to problem isolated (1997)
WebCat2: Items xx to xx shown, etc. (1997)
ODBC to WebCat (2000)
WCS Newbie question (1997)
WebCat2 - [format thousands] (1997)
[WebDNA] Friday's.. WIP thread (2009)
Bug Report, maybe (1997)
WebCatalog for guestbook ? (1997)
RE: Formulas.db + Users.db (1997)
Public beta 2 for WebCatalog 4.0 is now available. (2000)
# of real domains on 1 web server (1997)
[append] problem (1997)
Text data with spaces in them... (1997)
First postarg not taking in $Commands (1997)
ERROR in docs (2003)
select multiple 2 more cents (1997)