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 need two founditems loops as terry suggested to reach Ki's goals of displaying the in stock items 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 may be 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 Brooke WebDNA Software Corporation http://www.webdna.us **[Square Bracket Utopia]** Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Data Type Bool (John Butler 2009)
  2. Re: [WebDNA] Data Type Bool (Patrick McCormick 2009)
  3. Re: [WebDNA] Data Type Bool (Brian Fries 2009)
  4. Re: [WebDNA] Data Type Bool (Patrick McCormick 2009)
  5. Re: [WebDNA] Data Type Bool (Govinda 2009)
  6. Re: [WebDNA] Data Type Bool ("Terry Wilson" 2009)
  7. Re: [WebDNA] Data Type Bool (Patrick McCormick 2009)
  8. Re: [WebDNA] Data Type Bool ("Ki Song - Knifecenter.com" 2009)
  9. Re: [WebDNA] Data Type Bool ("Terry Wilson" 2009)
  10. Re: [WebDNA] Data Type Bool (Patrick McCormick 2009)
  11. Re: [WebDNA] Data Type Bool (Donovan Brooke 2009)
  12. Re: [WebDNA] Data Type Bool (Marc Thompson 2009)
  13. Re: [WebDNA] Data Type Bool (Patrick McCormick 2009)
  14. Re: [WebDNA] Data Type Bool (Marc Thompson 2009)
  15. Re: [WebDNA] Data Type Bool (Patrick McCormick 2009)
  16. Re: [WebDNA] Data Type Bool (Terry Wilson 2009)
  17. Re: [WebDNA] Data Type Bool ("Ki Song - Knifecenter.com" 2009)
  18. Re: [WebDNA] Data Type Bool (Govinda 2009)
  19. [WebDNA] Data Type Bool ("Ki Song - Knifecenter.com" 2009)
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 need two founditems loops as terry suggested to reach Ki's goals of displaying the in stock items 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 may be 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 Brooke WebDNA Software Corporation http://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:

Weird problems with [SHOWIF]s (1997) Bug Report, maybe (1997) bug in [SendMail] (1997) PCS Customer submissions ? (1997) strange problem listfiles and movefile (2000) Hard Questions ? (1997) Help name our technology! I found it (1997) hmmm (2006) PCS Frames-Default page is solution! (1997) [WebDNA] WebDNA 7.1 (2012) multi-paragraph fields (1997) Comments in db? (1997) Search returns all, not 20 (1997) [WC 2.1.30] Stack overflow. (2000) [SHOWIF AND/OR] (1997) Client-side Image Maps and WebCat? (1998) [WriteFile] problems (1997) 300% usage - Clint (2007) Re:Message Board (1998) Integrating Bar Codes with WebDNA (2006)