Re: [WebDNA] Data Type Bool
This WebDNA talk-list message is from 2009
It keeps the original formatting.
numero = 103140
interpreted = N
texte = Patrick McCormick wrote:> More completely:> > [search stuff sorted by SKU]> [founditems]> [showif [instock]> [item fields]> [/showif]> [hideif [instock]]> [item fields]> [/hideif]> [/founditems]> [/search]Well, not quite ;-) You would still needtwo founditems loops as terry suggested toreach Ki's goals of displaying the in stockitems first..but then adding your notion of putting[instock] inside the founditems loop..[search db=db.db&neSKUdatarq=find_all&asSKUsort=1] [founditems] [showif [yourstockfield]>0] ... [/showif] [/founditems] [founditems] [showif [yourstockfield]<1] ... [/showif] [/founditems][/search]However, I think Marc's suggestion of 2 searches maybe faster (not any showif comparisons).. something like:[search db=db.db&asSKUsort=1&grONHANDdatarq=0&ONHANDtype=num] [founditems] ... [/founditems][/search][search db=db.db&asSKUsort=1&lsONHANDdatarq=1&ONHANDtype=num] [founditems] ... [/founditems][/search]Note that I changed "ON HAND" to "ONHAND".Donovan-- Donovan BrookeWebDNA Software Corporationhttp://www.webdna.us**[Square Bracket Utopia]**
Associated Messages, from the most recent to the oldest:
Patrick McCormick wrote:> More completely:> > [search stuff sorted by SKU]>
[founditems]> [showif [instock]> [item fields]> [/showif]> [hideif [instock]]> [item fields]> [/hideif]> [/founditems]> [/search]Well, not quite ;-) You would still needtwo founditems loops as terry suggested toreach Ki's goals of displaying the in stockitems first..but then adding your notion of putting[instock] inside the founditems loop..[search db=db.db&neSKUdatarq=find_all&asSKUsort=1]
[founditems] [showif [yourstockfield]>0] ... [/showif] [/founditems]
[founditems] [showif [yourstockfield]<1] ... [/showif] [/founditems][/search]However, I think Marc's suggestion of 2 searches maybe faster (not any showif comparisons).. something like:[search db=db.db&asSKUsort=1&grONHANDdatarq=0&ONHANDtype=num]
[founditems] ... [/founditems][/search][search db=db.db&asSKUsort=1&lsONHANDdatarq=1&ONHANDtype=num]
[founditems] ... [/founditems][/search]Note that I changed "ON HAND" to "ONHAND".Donovan-- Donovan BrookeWebDNA Software Corporationhttp://www.webdna.us**[Square Bracket Utopia]**
Donovan Brooke
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:
A good idea? (1998)
Questions (1998)
[url] (1997)
flushdatabases (1997)
PCS Emailer's role ? (1997)
New Plug-in and Type 11 errors (1997)
PCS Frames (1997)
WebCat 4.0 (2000)
Sendmail question (2005)
Setting up shop (1997)
Solution help needed (1998)
Error.html (1997)
Cart questions (1997)
Help formatting search results w/ table (1997)
lookup problem (2000)
OT JavaScript question (1999)
[protect admin] (1997)
Dates (1998)
emailer error 103 part ii (1997)
WebDNA Feature Request (2006)