Re: [BULK] Re: [WebDNA] [if] or [case] or something else

This WebDNA talk-list message is from

2012


It keeps the original formatting.
numero = 110027
interpreted = N
texte = Hi Thanks I think I've got it sussed although I'm liking the table thing as = well.=20 Cheers =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Steve Craig - Asylum Interactive Ltd Tel +44 1330 860550 Fax +44 1330 860880 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D http://www.asylumweb.com Email: steve@asylumweb.com Skype: s.craig - iChat: steve.craig =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D On 13 Dec 2012, at 17:41, "Brian B. Burton" wrote: > another way to deal with this is to use a table (or database) and = search function. >=20 > [table name=3Dqtydiscount&fields=3Dlow,high,discount] [!] tabs have = been replaced with commas for readability, code won't work like this = [/!] > 1,4,.00 > 5,9,.02 > 10,19,.03 > 20,29,.04 > 30,9999,.05 > [/table] >=20 > [text]howmany=3D7[/text] > [search = table=3Dqtydiscount&geLOWdatarq=3D[howmany]&leHIGHdatarq=3D[howmany]&max=3D= 1][founditems][discount][/founditems][/search] >=20 >=20 >=20 > A tip of the hat to Grant Hulbert, who taught me this method a very = very long time ago.=20 >=20 > Brian B. Burton >=20 > On Dec 13, 2012, at 10:13 AM, Steve Craig wrote: >=20 >> Hi All >>=20 >> I have a little problem that I'm hoping someone cane help with or at = least point me in the correct direction. >>=20 >> I have a list of prices, if the price lies in a particular range I do = one set of maths, if it lies in a different range I do a different thing = etc etc.=20 >>=20 >> <650 then set x to 120 >> =3D>650 and < 800 set x to 110 >> =3D>800 and < 950 set x to 100 >> .... >> .... >> .... >>> 1550 set x to 50 >>=20 >> What is the best way to code it, using if then or using switch? If = it's switch then what is the syntax of the case bit? Or maybe a = different way? >>=20 >> Any help much appreciated. >>=20 >=20 >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us Associated Messages, from the most recent to the oldest:

    
Hi Thanks I think I've got it sussed although I'm liking the table thing as = well.=20 Cheers =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Steve Craig - Asylum Interactive Ltd Tel +44 1330 860550 Fax +44 1330 860880 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D http://www.asylumweb.com Email: steve@asylumweb.com Skype: s.craig - iChat: steve.craig =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D On 13 Dec 2012, at 17:41, "Brian B. Burton" wrote: > another way to deal with this is to use a table (or database) and = search function. >=20 > [table name=3Dqtydiscount&fields=3Dlow,high,discount] [!] tabs have = been replaced with commas for readability, code won't work like this = [/!] > 1,4,.00 > 5,9,.02 > 10,19,.03 > 20,29,.04 > 30,9999,.05 > [/table] >=20 > [text]howmany=3D7[/text] > [search = table=3Dqtydiscount&geLOWdatarq=3D[howmany]&leHIGHdatarq=3D[howmany]&max=3D= 1][founditems][discount][/founditems][/search] >=20 >=20 >=20 > A tip of the hat to Grant Hulbert, who taught me this method a very = very long time ago.=20 >=20 > Brian B. Burton >=20 > On Dec 13, 2012, at 10:13 AM, Steve Craig wrote: >=20 >> Hi All >>=20 >> I have a little problem that I'm hoping someone cane help with or at = least point me in the correct direction. >>=20 >> I have a list of prices, if the price lies in a particular range I do = one set of maths, if it lies in a different range I do a different thing = etc etc.=20 >>=20 >> <650 then set x to 120 >> =3D>650 and < 800 set x to 110 >> =3D>800 and < 950 set x to 100 >> .... >> .... >> .... >>> 1550 set x to 50 >>=20 >> What is the best way to code it, using if then or using switch? If = it's switch then what is the syntax of the case bit? Or maybe a = different way? >>=20 >> Any help much appreciated. >>=20 >=20 >=20 > --------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us Steve Craig

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:

[setcookie] & [redirect] (1998) Size limit for tmpl editor ? (1997) Some Advise needed (1997) no word on MacAuthorize... (1997) [WebDNA] drop off not round off (2011) RE: Emailer prefs in two places ... (1997) textarea inputs and returns (1999) Fufillment e-mail? (1998) (1997) Help- Linux Install Serial number not taling. (2000) [taxrate] question (1997) Great product and great job ! (1997) nesting limits? (1998) emailer settings and control questions (1997) WebCat2b13MacPlugIn - syntax to convert date (1997) japanese characters (1997) Format all of a sudden doesn't work (1997) notification solutions (1997) Bad cookie (1998) Search results templates (1996)