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:
[BULK] [WebDNA] Happy St. Patricks Day WEBDNA (2018)
searchable list archive (1997)
How to implement 'email to a friend' feature? (2002)
[OT] Airport Problem (2003)
Re:2nd WebCatalog2 Feature Request (1996)
Welcome! (2000)
Time for a hard questions. (1997)
Problems w/ heavy use of cart header fields? (1998)
[cart] not being interpreted inside [founditems] (1997)
Emailer setup (1997)
Another question (1997)
Using Applescript to process WebCatalog functions (1998)
Fedora Core 3 and WebDNA (2005)
# fields limited? (1997)
price carry over (1997)
Number of Line Items (1998)
Help! WebCat2 bug (1997)
Share Bulletin Board? (1998)
Now you see it now you donīt (1997)
debit cards and checksum (1998)