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:

OT: WebCat Programmer (2000) [/application] error? (1997) RE: Multiple Stores and WebCatalog Prefs (1997) WebCat2b15MacPlugin - [protect] (1997) Problems with Summary and WEBCAT (1999) Re: (1997) Flash Stores (2003) Web Catalog 2 demo (1997) Running _every_ page through WebCat ? (1997) User / Pass in TCP connect (2007) Setting up shop (1997) READFILE command? (1998) OFF TOPIC: help wanted (1997) RequiredFields template (1997) SendMail context not working on CentOS 4 (2007) Languages (1997) DON'T use old cart file! (1997) contextual shownext (1998) OT: CT Scan might have saved my life!! (2006) WebCatalog stalls (1998)