Re: [WebDNA] return missing db number
This WebDNA talk-list message is from 2010
It keeps the original formatting.
numero = 104736
interpreted = N
texte = Untested, and kind of simplified. You could join some of the conditional statements together with Ands and Ors, but this should give you the general idea.[search db=whatever.db&neskudatarq=[blank]&skusort=1&skusdir=as][founditems][showif [index]=1][!] First one. Set low boundary. [/!][text show=f]intLowest=[sku][/text][text show=f]intPrev=[sku][/text][text show=f]strFoundLow=F[/text][/showif][hideif [index]=1][showif [sku]=[math][intPrev]+1[/math]][!] Sku is equal to previous sku+1 [/!][text show=f]intPrev=[sku][/text][/showif][hideif [sku]=[math][intPrev]+1[/math]][showif [strFoundLow]=F][!] Sku is not equal to previous sku+1 - Reset Lowest and set flag to hide[/!][text show=f]intLowest=[sku][/text][text show=f]strFoundLow=T[/text][/showif][/hideif][/hideif][/founditems][/search][intLowest]sbraun wrote:> Hi All,>> I'm trying to do a search for the lowest, missing, ordered number in a > db.>> The .db file is like this:>> SKU > 1 > 2 > 4> 5> 7> etc. >> returns: 3 >>> What's the best way to solve this without miles & miles of code?>> Thanks much,> Steve> ---------------------------------------------------------> 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> old archives: http://dev.webdna.us/TalkListArchive/> Bug Reporting: > http://forum.webdna.us/eucabb.html?page=topics&category=288>>
Associated Messages, from the most recent to the oldest:
Untested, and kind of simplified. You could join some of the conditional statements together with Ands and Ors, but this should give you the general idea.[search db=whatever.db&neskudatarq=[blank]&skusort=1&skusdir=as][founditems][showif [index]=1][!] First one. Set low boundary. [/!][text show=f]intLowest=[sku][/text][text show=f]intPrev=[sku][/text][text show=f]strFoundLow=F[/text][/showif][hideif [index]=1][showif [sku]=[math][intPrev]+1[/math]][!] Sku is equal to previous sku+1 [/!][text show=f]intPrev=[sku][/text][/showif][hideif [sku]=[math][intPrev]+1[/math]][showif [strFoundLow]=F][!] Sku is not equal to previous sku+1 - Reset Lowest and set flag to hide[/!][text show=f]intLowest=[sku][/text][text show=f]strFoundLow=T[/text][/showif][/hideif][/hideif][/founditems][/search][intLowest]sbraun wrote:> Hi All,>> I'm trying to do a search for the lowest, missing, ordered number in a > db.>> The .db file is like this:>> SKU > 1 > 2 > 4> 5> 7> etc. >> returns: 3 >>> What's the best way to solve this without miles & miles of code?>> Thanks much,> Steve> ---------------------------------------------------------> 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> old archives: http://dev.webdna.us/TalkListArchive/> Bug Reporting: > http://forum.webdna.us/eucabb.html?page=topics&category=288>>
Matthew Bohne
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:
All choices on IE different than Netscape (1997)
WebCommerce: Folder organization ? (1997)
Cookie woes with Mac IE4 (1998)
Problem (1997)
WC2b15 - [HTMLx]...[/HTMLx] problems (1997)
Is there a max number of fields? (1998)
Getting it as [raw] (2004)
WebCat2b13MacPlugIn - [shownext method=post] ??? (1997)
Shell context. (2002)
verify online (1997)
password authentication schemes (2003)
PROBLEM (1997)
SQL Madness (2005)
New [math] variable not working... (2001)
Setting up shop (1997)
WebCatalog Prefs.ref file ? (1998)
Authorize.net for dummies (2003)
request for comment tag (1998)
Fun with Dates - revisited (1997)
[WebDNA] [WSC] WebDNA Development Summit (2014)