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:

Suffix Mapping (1997) New Installation (1998) calender with business days (1998) 2 easy questions re: [showif] and [sendmail] (1997) Secure Server (1997) WebCat2: Items xx to xx shown, etc. (1997) Authenticate (1997) [WriteFile] problems (1997) orders (1998) all records returned. (1997) Emailer choke (1997) WC Database Format (1997) Shipping Calculation Problem (1997) Multiple catalog databases and showcart (1997) WebCatalog can't find database (1997) Sku numbers (1997) shopcost, unitshipcost (2002) autosensing lanague selection (1997) Store Example to Use (1998) tcp connect includes (1999)