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:
credit card authorization question (1997)
Make sure I understand this??? (1997)
Narrowing NT Crashing error (2000)
MASTER_STORE revision (2002)
For those of you not on the WebCatalog Beta... (1997)
Logical and or in [hideif] (1997)
Scope of variables in multi include files (2000)
OT: Development contracts (1999)
Redirect and Window Size (2000)
OR-searching (2000)
[SHOWIF AND/OR] (1997)
WebCat2: Items xx to xx shown, etc. (1997)
Proper file locations (1997)
Help name our technology! (1997)
[WebDNA] maybe silly suggestion? [founditems] (2015)
Dates (1998)
WebDNA performance comparisons? (2004)
Search returns all, not 20 (1997)
Credit Card Number checking (1997)
Bug or syntax error on my part? (1997)