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 romannumerals (I, II, III)? Or is ii considered greater than i (as in theletter)? Or should I just shut-up and go home already since it's quittingtime anyways?:)GK-----Original Message-----From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf OfBrian FriesSent: Wednesday, April 09, 2003 12:43 PMTo: WebDNA TalkSubject: Re: Help with [search] sortWill -You should certainly be able to get the found items you want with thesearch alone. Let me walk through this and see if I properly understandwhat 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 andoily (my examples) ...* The skintype variable, prior to your search, contains the name ofone of these skin type fields (dry or oily)...* The level variable, prior to your search, contains (blank), I orIIIf the above is true, then the search you've defined should properlyreturn only those records that have both the matching skin type fieldset 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 areset up beforehand.To test this, I would duplicate the [search] tag immediately prior tothe existing [search] tag and disable it so it displays with itsparameters on the page instead of evaluating...[**searchdb=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 youwere expecting.One other note... In your hideif / lookup method for hiding undesirablerecords, you could skip the lookup and instead use[interpret][[skintype]][/interpret], which would be much faster thanthe 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:
Will grleveldatarq=[level] figure properly if the levels are in romannumerals (I, II, III)? Or is ii considered greater than i (as in theletter)? Or should I just shut-up and go home already since it's quittingtime anyways?:)GK-----Original Message-----From: WebDNA Talk [mailto:WebDNA-Talk@talk.smithmicro.com]On Behalf OfBrian FriesSent: Wednesday, April 09, 2003 12:43 PMTo: WebDNA TalkSubject: Re: Help with [search] sortWill -You should certainly be able to get the found items you want with thesearch alone. Let me walk through this and see if I properly understandwhat 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 andoily (my examples) ...* The skintype variable, prior to your search, contains the name ofone of these skin type fields (dry or oily)...* The level variable, prior to your search, contains (blank), I orIIIf the above is true, then the search you've defined should properlyreturn only those records that have both the matching skin type fieldset 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 areset up beforehand.To test this, I would duplicate the [search] tag immediately prior tothe existing [search] tag and disable it so it displays with itsparameters on the page instead of evaluating...[**searchdb=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 youwere expecting.One other note... In your hideif / lookup method for hiding undesirablerecords, you could skip the lookup and instead use[interpret][[skintype]][/interpret], which would be much faster thanthe 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)