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:

Need correct syntax for writing to header2 (1999) Bulletin Board.... (2000) WebCat b13 CGI -shownext- (1997) Unexpected comparison behavior change in 4.5.1 (2003) Locking up with WebCatalog... (1997) Follow-up to listfiles bug report ... (2003) Banner DNA (1997) emailer (1997) Re:Emailer tracking (1997) Speed Optimization - Mac (1997) FREE Web Server Monitor FREE (1997) About WebDNA (2006) shipcost (1997) shipcost (1997) Help formatting search results w/ table (1997) Digest for 4/18/97 (1997) Not accepting Zero (2000) Some Questions (1997) CVS Files for databases (2000) Sorting problem (2002)