Re: Help with [search] sort

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 49375
interpreted = N
texte = Will grleveldatarq=[level] figure properly if the levels are in roman numerals (I, II, III)? Or is ii considered greater than i (as in the letter)? Or should I just shut-up and go home already since it's quitting time anyways?:)GK -----Original Message----- From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf Of Brian Fries Sent: Wednesday, April 09, 2003 12:43 PM To: WebDNA Talk Subject: Re: Help with [search] sort Will -You should certainly be able to get the found items you want with the search alone. Let me walk through this and see if I properly understand what you're trying to do...* Your catalog.db has a level field containing I, II or III... * Your catalog.db has fields for various skin types, say dry and oily (my examples) ... * The skintype variable, prior to your search, contains the name of one of these skin type fields (dry or oily)... * The level variable, prior to your search, contains (blank), I or IIIf the above is true, then the search you've defined should properly return only those records that have both the matching skin type field set to T and the level field greater than the specified level. That is, I think your [search] looks fine, as long as the proper conditions are set up beforehand.To test this, I would duplicate the [search] tag immediately prior to the existing [search] tag and disable it so it displays with its parameters on the page instead of evaluating...[**search db=catalog.db&eq[skintype]datarq=T&grleveldatarq=[level]&ascategorysort= 1&astitlesort=2&asskusort=3&instockdatarq=T]
Load the page, look at the displayed results and see if it is what you were expecting.One other note... In your hideif / lookup method for hiding undesirable records, you could skip the lookup and instead use [interpret][[skintype]][/interpret], which would be much faster than the lookup method.- brianOn Wednesday, April 9, 2003, at 09:17 AM, WJ Starck wrote:> > On Wednesday, April 9, 2003, at 09:51 AM, WJ Starck wrote: >> >> >> Here is the current search: >> >> [search >> db=catalog.db&eq[skintype]datarq=T&grleveldatarq=[level]&ascategorysor >> t=1&astitlesort=2&asskusort=3&instockdatarq=T] >> >> > > OK, this did the trick > [search > db=catalog.db&eq[skintype]datarq=T&grleveldatarq=[level]&ascategorysort > =1&astitlesort=2&asskusort=3&instockdatarq=T] > > [founditems] > [hideif [lookup > db=catalog.db&value=[sku]&lookinfield=sku&returnfield=[skintype]]!T] > > Blah > > Still wondering if it can be done from the search though... > -- > > Will Starck > NovaDerm Skincare Science > http://www.novaderm.com > wjs@novaderm.com > -- Brian Fries, BrainScan Software -- http://www.brainscansoftware.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://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Help with [search] sort (Gary Krockover 2003)
  2. Re: Help with [search] sort (Brian Fries 2003)
  3. Re: Help with [search] sort (WJ Starck 2003)
  4. Help with [search] sort (WJ Starck 2003)
Will grleveldatarq=[level] figure properly if the levels are in roman numerals (I, II, III)? Or is ii considered greater than i (as in the letter)? Or should I just shut-up and go home already since it's quitting time anyways?:)GK -----Original Message----- From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf Of Brian Fries Sent: Wednesday, April 09, 2003 12:43 PM To: WebDNA Talk Subject: Re: Help with [search] sort Will -You should certainly be able to get the found items you want with the search alone. Let me walk through this and see if I properly understand what you're trying to do...* Your catalog.db has a level field containing I, II or III... * Your catalog.db has fields for various skin types, say dry and oily (my examples) ... * The skintype variable, prior to your search, contains the name of one of these skin type fields (dry or oily)... * The level variable, prior to your search, contains (blank), I or IIIf the above is true, then the search you've defined should properly return only those records that have both the matching skin type field set to T and the level field greater than the specified level. That is, I think your [search] looks fine, as long as the proper conditions are set up beforehand.To test this, I would duplicate the [search] tag immediately prior to the existing [search] tag and disable it so it displays with its parameters on the page instead of evaluating...[**search db=catalog.db&eq[skintype]datarq=T&grleveldatarq=[level]&ascategorysort= 1&astitlesort=2&asskusort=3&instockdatarq=T]
Load the page, look at the displayed results and see if it is what you were expecting.One other note... In your hideif / lookup method for hiding undesirable records, you could skip the lookup and instead use [interpret][[skintype]][/interpret], which would be much faster than the lookup method.- brianOn Wednesday, April 9, 2003, at 09:17 AM, WJ Starck wrote:> > On Wednesday, April 9, 2003, at 09:51 AM, WJ Starck wrote: >> >> >> Here is the current search: >> >> [search >> db=catalog.db&eq[skintype]datarq=T&grleveldatarq=[level]&ascategorysor >> t=1&astitlesort=2&asskusort=3&instockdatarq=T] >> >> > > OK, this did the trick > [search > db=catalog.db&eq[skintype]datarq=T&grleveldatarq=[level]&ascategorysort > =1&astitlesort=2&asskusort=3&instockdatarq=T] > > [founditems] > [hideif [lookup > db=catalog.db&value=[sku]&lookinfield=sku&returnfield=[skintype]]!T] > > Blah > > Still wondering if it can be done from the search though... > -- > > Will Starck > NovaDerm Skincare Science > http://www.novaderm.com > wjs@novaderm.com > -- Brian Fries, BrainScan Software -- http://www.brainscansoftware.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://webdna.smithmicro.com/ Gary Krockover

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:

BBEdit and WebCatalog 2.0? (1997) Detecting NULL value in returned SQL (2000) [WebDNA] HTTP Streaming - POSSIBLE! (2010) Roundup function? (1997) WebCatalog Prefs.ref file ? (1998) Text variables do not show (1999) [OT] (waaaay OT) (2004) can WC render sites out? (1997) Configuring E-mail (1997) convertWords... (2001) allow or deny based on referer.... (1997) Error Lob.db records error message not name (1997) can WC render sites out? (1997) [append] vs. [appendfile] delta + question? (1997) 5.0 Pricing (2003) Reversed words (1997) my price won't move (1997) WC2.0 Memory Requirements (1997) WC Database Format (1997) [defined]ish (1997)