Re: range vs greater than/less than
This WebDNA talk-list message is from 2003
It keeps the original formatting.
numero = 48360
interpreted = N
texte = Or maybe you are just backwards .. and need to get some sleep ;)> oh yeah - i completely re-wrote this to uses ranges in the end cause i> couldn't get it to work. i later discovered that the way webcat does> comparisons using gr and le is completely the opposite of that which> you would expect.> ----- Original Message -----> From: Brian Fries
> To: WebDNA Talk > Sent: Wednesday, March 05, 2003 8:22 PM> Subject: Re: range vs greater than/less than>>>> You're missing a few ampersands between your search terms at the>> end...>>>> - brian>>>> On Tuesday, March 4, 2003, at 02:33 PM, Andrew Simpson wrote:>>>> > Do you have to code this so that you use the field name in one>> > instance and>> > group name in the other cause this isn't working either:>> >>> > db=/db/>> > products.db&eqVISIBLEdatarq=T&GROUP1field=prod_brightness&GROUP1type=>> >number&GROUP2field=prod_weight&GROUP2type=number&GROUP3field=price&GROU>> > P3typ>> >e=number&geGROUP1datarq=5800geGROUP2datarq=1.5leGROUP1datarq=10000leGRO>> > UP2da>> > tarq=8>> >>> > ????>> >>> > ----- Original Message ----->> > From: Brian Fries >> > To: WebDNA Talk >> > Sent: Wednesday, March 05, 2003 10:55 AM>> > Subject: Re: range vs greater than/less than>> >>> >>> >> This sounds like a job for the Group Field Workaround! Defining a>> >> groupfield that contains a field you're already searching lets you>> >> search that field again...>> >>>> >> [search>> >> db=...&group1field=ABC&leABCdata=[max]&geGROUP1data=[min]...]>> >>>> >> It's kinda ugly and tricker to write in a generic fashion, but it>> >> works.>> >>>> >> - brian>> >>>> >> On Tuesday, March 4, 2003, at 01:46 PM, Andrew Simpson wrote:>> >>>> >>> This is just a comment really on the way webcat does something>> >>> that i don't>> >>> like.>> >>>>> >>> I have just finished writing a search page that lets you select>> >>> from drop>> >>> down lists to refine your search. The company sells projectors.>> >>> The search>> >>> criteria are>> >>>>> >>> min / max price>> >>> min / max resolution>> >>> min / max weight>> >>> min / max lumens (brightness)>> >>>>> >>> with a drop down for both min and max values for each item.>> >>>>> >>> You select your mins and maxiums and hopefully you get a set of>> >>> products>> >>> returned that are within the range.>> >>>>> >>> So I wrote some nice generic code that should handle all>> >>> eventuallities:>> >>>>> >>> [formvariables name=min&exact=false]>> >>> [showif [value]!#]>> >>> [text]search_string=[search_string]ge[getchars>> >>> start=5][name][/getchars]data=[value]&[getchars>> >>> start=5][name][/getchars]type=num&[/text]>> >>> [/showif]>> >>> [/formvariables]>> >>>>> >>> [formvariables name=max&exact=false]>> >>> [showif [value]!#]>> >>> [text]search_string=[search_string]le[getchars>> >>> start=5][name][/getchars]data=[value]&[getchars>> >>> start=5][name][/getchars]type=num&[/text]>> >>> [/showif]>> >>> [/formvariables]>> >>>>> >>> So depending on how many options the user chooses, the>> >>> search_string slowly>> >>> gets built up to the point where you run it and the found items>> >>> loop does>> >>> the rest. It works great if you only select a min for one field or>> >>> a max for>> >>> one field>> >>>>> >>> BUT IT DOESN'T WORK IF YOU SELECT BOTH MIN AND MAX FROM ONE FIELD!>> >>>>> >>> Because of the way webcat works with Ranges when comparing>> >>> multiple values>> >>> on the same field of the database, this code is toast and now i>> >>> have to>> >>> write some not so nice generic code to handle the same search job.>> >>>>> >>> Argh!>> >>>>> >>> okay - sorry, i didn't get much sleep last night.>> >> -- Brian Fries, BrainScan Software -->> >> http://www.brainscansoftware.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/>>> -------------------------------------------------------------> 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/-- Alain RussellBlackpepper Interactivealain.russell@blackpepper.co.nzph. 09 520 6280-------------------------------------------------------------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:
Or maybe you are just backwards .. and need to get some sleep ;)> oh yeah - i completely re-wrote this to uses ranges in the end cause i> couldn't get it to work. i later discovered that the way webcat does> comparisons using gr and le is completely the opposite of that which> you would expect.> ----- Original Message -----> From: Brian Fries > To: WebDNA Talk > Sent: Wednesday, March 05, 2003 8:22 PM> Subject: Re: range vs greater than/less than>>>> You're missing a few ampersands between your search terms at the>> end...>>>> - brian>>>> On Tuesday, March 4, 2003, at 02:33 PM, Andrew Simpson wrote:>>>> > Do you have to code this so that you use the field name in one>> > instance and>> > group name in the other cause this isn't working either:>> >>> > db=/db/>> > products.db&eqVISIBLEdatarq=T&GROUP1field=prod_brightness&GROUP1type=>> >number&GROUP2field=prod_weight&GROUP2type=number&GROUP3field=price&GROU>> > P3typ>> >e=number&geGROUP1datarq=5800geGROUP2datarq=1.5leGROUP1datarq=10000leGRO>> > UP2da>> > tarq=8>> >>> > ????>> >>> > ----- Original Message ----->> > From: Brian Fries >> > To: WebDNA Talk >> > Sent: Wednesday, March 05, 2003 10:55 AM>> > Subject: Re: range vs greater than/less than>> >>> >>> >> This sounds like a job for the Group Field Workaround! Defining a>> >> groupfield that contains a field you're already searching lets you>> >> search that field again...>> >>>> >> [search>> >> db=...&group1field=ABC&leABCdata=[max]&geGROUP1data=[min]...]>> >>>> >> It's kinda ugly and tricker to write in a generic fashion, but it>> >> works.>> >>>> >> - brian>> >>>> >> On Tuesday, March 4, 2003, at 01:46 PM, Andrew Simpson wrote:>> >>>> >>> This is just a comment really on the way webcat does something>> >>> that i don't>> >>> like.>> >>>>> >>> I have just finished writing a search page that lets you select>> >>> from drop>> >>> down lists to refine your search. The company sells projectors.>> >>> The search>> >>> criteria are>> >>>>> >>> min / max price>> >>> min / max resolution>> >>> min / max weight>> >>> min / max lumens (brightness)>> >>>>> >>> with a drop down for both min and max values for each item.>> >>>>> >>> You select your mins and maxiums and hopefully you get a set of>> >>> products>> >>> returned that are within the range.>> >>>>> >>> So I wrote some nice generic code that should handle all>> >>> eventuallities:>> >>>>> >>> [formvariables name=min&exact=false]>> >>> [showif [value]!#]>> >>> [text]search_string=[search_string]ge[getchars>> >>> start=5][name][/getchars]data=[value]&[getchars>> >>> start=5][name][/getchars]type=num&[/text]>> >>> [/showif]>> >>> [/formvariables]>> >>>>> >>> [formvariables name=max&exact=false]>> >>> [showif [value]!#]>> >>> [text]search_string=[search_string]le[getchars>> >>> start=5][name][/getchars]data=[value]&[getchars>> >>> start=5][name][/getchars]type=num&[/text]>> >>> [/showif]>> >>> [/formvariables]>> >>>>> >>> So depending on how many options the user chooses, the>> >>> search_string slowly>> >>> gets built up to the point where you run it and the found items>> >>> loop does>> >>> the rest. It works great if you only select a min for one field or>> >>> a max for>> >>> one field>> >>>>> >>> BUT IT DOESN'T WORK IF YOU SELECT BOTH MIN AND MAX FROM ONE FIELD!>> >>>>> >>> Because of the way webcat works with Ranges when comparing>> >>> multiple values>> >>> on the same field of the database, this code is toast and now i>> >>> have to>> >>> write some not so nice generic code to handle the same search job.>> >>>>> >>> Argh!>> >>>>> >>> okay - sorry, i didn't get much sleep last night.>> >> -- Brian Fries, BrainScan Software -->> >> http://www.brainscansoftware.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/>>> -------------------------------------------------------------> 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/-- Alain RussellBlackpepper Interactivealain.russell@blackpepper.co.nzph. 09 520 6280-------------------------------------------------------------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/
Alain Russell
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:
Separate SSL Server (1997)
Comments in db? (1997)
PIXO Support (1997)
Progress !! WAS: Trouble with formula.db (1997)
Mac 2.1b4 unknown error: BadSuffix (1997)
Protecting Images (2003)
Question re: FlushDatabases (1997)
Form Weirdness (2002)
Help! WebCat2 bug (1997)
Can I invoke an ssi plugin from within a webcat page (1997)
Looking for WebDNA 3.08 MAC (2003)
[WebDNA] how can i grab the contents of a post? (2011)
Re(8): Small Bug: ErrorLog.txt/[FORMVARIABLES]/[ORDERFILE] (1998)
Search inside Include (1998)
re: [addlineitem] working almost (1997)
WebCat2b13MacPlugIn - [include] doesn't allow creator (1997)
customizing the color of user's pages (1997)
Error Log.db --however (1997)
sort by day of week... (2003)
Dark Horse Comics success story (1997)