RE: [BULK] Re: [WebDNA] [if] or [case] or something else
This WebDNA talk-list message is from 2012
It keeps the original formatting.
numero = 110030
interpreted = N
texte = Should it not be ....[text]howmany=7[/text][searchtable=qtydiscount&leLOWdatarq=[howmany]&geHIGHdatarq=[howmany]&max=1][founditems][discount][/founditems][/search]The "le" and "ge" switch places so that with the value 7, it targets thecorrect row of 5,9,.02Cheers TDn-----Original Message-----From: Brian B. Burton [mailto:brian@burtons.com] Sent: Friday, December 14, 2012 01:42To: talk@webdna.usSubject: [BULK] Re: [WebDNA] [if] or [case] or something elseImportance: Lowanother way to deal with this is to use a table (or database) and searchfunction.[table name=qtydiscount&fields=low,high,discount] [!] tabs have beenreplaced with commas for readability, code won't work like this [/!]1,4,.005,9,.0210,19,.0320,29,.0430,9999,.05[/table][text]howmany=7[/text][searchtable=qtydiscount&geLOWdatarq=[howmany]&leHIGHdatarq=[howmany]&max=1][founditems][discount][/founditems][/search]A tip of the hat to Grant Hulbert, who taught me this method a very verylong time ago. Brian B. BurtonOn Dec 13, 2012, at 10:13 AM, Steve Craig
wrote:> Hi All> > I have a little problem that I'm hoping someone cane help with or at leastpoint me in the correct direction.> > I have a list of prices, if the price lies in a particular range I do oneset of maths, if it lies in a different range I do a different thing etcetc. > > <650 then set x to 120> =>650 and < 800 set x to 110> =>800 and < 950 set x to 100> ....> ....> ....>> 1550 set x to 50> > What is the best way to code it, using if then or using switch? If it'sswitch then what is the syntax of the case bit? Or maybe a different way?> > Any help much appreciated.> ---------------------------------------------------------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.usBug Reporting: support@webdna.us
Associated Messages, from the most recent to the oldest:
Should it not be ....[text]howmany=7[/text][searchtable=qtydiscount&leLOWdatarq=[howmany]&geHIGHdatarq=[howmany]&max=1][founditems][discount][/founditems][/search]The "le" and "ge" switch places so that with the value 7, it targets thecorrect row of 5,9,.02Cheers TDn-----Original Message-----From: Brian B. Burton [mailto:brian@burtons.com] Sent: Friday, December 14, 2012 01:42To: talk@webdna.usSubject: [BULK] Re: [WebDNA] [if] or [case] or something elseImportance: Lowanother way to deal with this is to use a table (or database) and searchfunction.[table name=qtydiscount&fields=low,high,discount] [!] tabs have beenreplaced with commas for readability, code won't work like this [/!]1,4,.005,9,.0210,19,.0320,29,.0430,9999,.05[/table][text]howmany=7[/text][searchtable=qtydiscount&geLOWdatarq=[howmany]&leHIGHdatarq=[howmany]&max=1][founditems][discount][/founditems][/search]A tip of the hat to Grant Hulbert, who taught me this method a very verylong time ago. Brian B. BurtonOn Dec 13, 2012, at 10:13 AM, Steve Craig wrote:> Hi All> > I have a little problem that I'm hoping someone cane help with or at leastpoint me in the correct direction.> > I have a list of prices, if the price lies in a particular range I do oneset of maths, if it lies in a different range I do a different thing etcetc. > > <650 then set x to 120> =>650 and < 800 set x to 110> =>800 and < 950 set x to 100> ....> ....> ....>> 1550 set x to 50> > What is the best way to code it, using if then or using switch? If it'sswitch then what is the syntax of the case bit? Or maybe a different way?> > Any help much appreciated.> ---------------------------------------------------------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.usBug Reporting: support@webdna.us
"Terry Nair"
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:
Still Stumped on ShowNext...HELP! (1997)
Word search (1997)
Bug Report, maybe (1997)
question: webdelivery folder and file (1997)
SiteGuard Admin Feature ? (1997)
WebStar5 and realm authentication (2003)
Nested tags count question (1997)
SiteEdit NewFile.html ? (1997)
WebDNA & Apache 1.3.27 (2003)
Browser Info.txt (1997)
Using Plug-In while running 1.6.1 (1997)
Strange intermittent WebDNA problems (2008)
Re:quit command on NT (1997)
sendmail and CGatePro - Not working (2003)
[thisurl] (2004)
emailer (1998)
Re2: frames & carts (1997)
Encrypt/Decrypt (2007)
Help name our technology! (1997)
Emailer problems addition (1999)