Re: Help with [search] sort
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 49374
interpreted = N
texte = 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:
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/
Brian Fries
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:
Snake Bites (1997)
[OT] Security Certs (2000)
Out of the woodwork (2007)
HTML editing and webcatalog (2000)
Re1000001: Setting up shop (1997)
typhoon... (1997)
WebCat2b13MacPlugIn - More limits on [include] (1997)
Crazy dates (was: sorting dates) (1999)
I'm Baaaaaaaaaack - Questions! (2000)
WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997)
two unique banners on one page (1997)
[middle] of nowhere .. ? (2001)
BBedit wierdness upon opening "wide" database (2006)
Email within tmpl ? (1997)
RE: Formulas.db + Users.db (1997)
PCS Frames (1997)
Locking up with WebCatalog... (1997)
WC2b15 File Corruption (1997)
shipcost (1997)
OT: Sending email to lots of subscribers (1999)