Re: OR-searching

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 27717
interpreted = N
texte = >>> try [search db=group.db&woGROUP_IDdatarq=1&woGROUP_IDdatarq=2] >>> in a database like this: >>> >>> GROUP_ID >>> 2 >>> 12 >>> 206 >>> 422 This search will fail because there are two parameters targeting the same database field. Please remember, it is NOT ALLOWED to search on a 'database' field with more than one parameter! If you need to search the same database field with more than one parameter, you MUST use the group field technique, like this:[search db=group.db &group1field=GROUP_ID &group2field=GROUP_ID &wogroup1datarq=1 &wogroup2datarq=2]... because this is not actually searching on a 'database' field, it is actually searching on a 'group' field which you have created dynamically within the search context itself.The above search will retrieve all 4 records because either 1 or 2 appears in all of them. But if you want to retrieve only records which have *exactly* 1 or 2 in the GROUP_ID field (which in this case is only the first record) you must ALSO add the ww parameter to each search field, so the search context looks like this:[search db=group.db &group1field=GROUP_ID &group2field=GROUP_ID &wogroup1datarq=1 &wogroup1datarq=2 &group1word=ww &group2word=ww]Please note, I have added extra cr's to this code for clarity, so be sure to remove them if you're going to copy/paste these examples.================================ Kenneth Grome, WebDNA Consultant 808-737-6499 http://webdna.net ================================------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .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 Associated Messages, from the most recent to the oldest:

    
  1. Re: OR-searching (WebDNA Support 2000)
  2. Re: OR-searching (Kenneth Grome 2000)
  3. Re: OR-searching (Peter Ostry 2000)
  4. Re: OR-searching (Kenneth Grome 2000)
  5. Re: OR-searching (Peter Ostry 2000)
  6. Re: OR-searching (Michael A. Rosen 2000)
  7. Re: OR-searching (Peter Ostry 2000)
  8. Re: OR-searching (WebDNA Support 2000)
  9. Re: OR-searching (Brian Boegershausen 2000)
  10. OR-searching (Peter Ostry 2000)
>>> try [search db=group.db&woGROUP_IDdatarq=1&woGROUP_IDdatarq=2] >>> in a database like this: >>> >>> GROUP_ID >>> 2 >>> 12 >>> 206 >>> 422 This search will fail because there are two parameters targeting the same database field. Please remember, it is NOT ALLOWED to search on a 'database' field with more than one parameter! If you need to search the same database field with more than one parameter, you MUST use the group field technique, like this:[search db=group.db &group1field=GROUP_ID &group2field=GROUP_ID &wogroup1datarq=1 &wogroup2datarq=2]... because this is not actually searching on a 'database' field, it is actually searching on a 'group' field which you have created dynamically within the search context itself.The above search will retrieve all 4 records because either 1 or 2 appears in all of them. But if you want to retrieve only records which have *exactly* 1 or 2 in the GROUP_ID field (which in this case is only the first record) you must ALSO add the ww parameter to each search field, so the search context looks like this:[search db=group.db &group1field=GROUP_ID &group2field=GROUP_ID &wogroup1datarq=1 &wogroup1datarq=2 &group1word=ww &group2word=ww]Please note, I have added extra cr's to this code for clarity, so be sure to remove them if you're going to copy/paste these examples.================================ Kenneth Grome, WebDNA Consultant 808-737-6499 http://webdna.net ================================------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .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 Kenneth Grome

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:

form data submission gets truncated (1997) [WebDNA] Limits? (2009) Shipping costs question (2002) [shownext max=?] armed (1997) Umm...about those log files? (Off Topic) (1997) Showif date range comparison (1999) multiple search commands (1997) anyone interested in doing an open-source WebCatbasedforum? (2002) Shipping cost out of synch (1998) WebCat2: Items xx to xx shown, etc. (1997) TCPconnect to DNS (2000) Web Developer Product Awards (1997) Search the same field twice? (2004) request for comment tag (1998) did I miss anything (1997) Where is f2? (1997) Showif Or (2000) Strange sort in search... (2000) Snake Bites (1997) How can I Add several Items into the cart at once? (1997)