Re: randomness

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 14542
interpreted = N
texte = This is exactly what the random sorting order is for. For example, if you have a field named category, and the category you are matching is YOGURT, then it might look like:eqCATEGORYdatarq=YOGURT&raCATEGORYsort=1&max=1This will return one random record from the specified category.John.>I want to be able to pull a random item from a specific category in my >product database. (bcxprod.txt) >I'm thinking of somehow using the [random] function and a [showif] to an >[index] of the [founditems] but I'm not sure how to also limit this to one >specific category. Also, some categories may only have 13 items? but the >[random] tag is from 1 - 100. Using a showif in this case could lead to a >blank spot on my rendered webpage. John A. Hill Pacific Coast Software http://www.smithmicro.com Associated Messages, from the most recent to the oldest:

    
  1. Re: Balancing randomness (Rob Marquardt 2000)
  2. Re: Balancing randomness (Peter Ostry 2000)
  3. Re: SOLUTION.... Re: Balancing randomness (Rob Marquardt 2000)
  4. Re: Balancing randomness (Christer Olsson 2000)
  5. Re: SOLUTION.... Re: Balancing randomness (Kenneth Grome 2000)
  6. Re: SOLUTION.... Re: Balancing randomness (Rob Marquardt 2000)
  7. SOLUTION.... Re: Balancing randomness (Joseph D'Andrea 2000)
  8. Re[2]: Balancing randomness (Kenneth Grome 2000)
  9. Re: Balancing randomness (Joseph D'Andrea 2000)
  10. Re: Balancing randomness (John Butler 2000)
  11. Re[2]: Balancing randomness (Joseph D'Andrea 2000)
  12. Re: Balancing randomness (Miguel Castaneda 2000)
  13. Re: Balancing randomness (Rob Marquardt 2000)
  14. Re: Balancing randomness (Joseph D'Andrea 2000)
  15. Re[2]: Balancing randomness (jpeacock@univpress.com 2000)
  16. Re[2]: Balancing randomness (jpeacock@univpress.com 2000)
  17. Re: Balancing randomness (Peter Ostry 2000)
  18. Re: Balancing randomness (Rob Marquardt 2000)
  19. Re: Balancing randomness (Joseph D'Andrea 2000)
  20. Re: Balancing randomness (jpeacock@univpress.com 2000)
  21. Balancing randomness (Rob Marquardt 2000)
  22. Re: randomness (John Hill 1997)
  23. randomness (Brian B. Burton 1997)
This is exactly what the random sorting order is for. For example, if you have a field named category, and the category you are matching is YOGURT, then it might look like:eqCATEGORYdatarq=YOGURT&raCATEGORYsort=1&max=1This will return one random record from the specified category.John.>I want to be able to pull a random item from a specific category in my >product database. (bcxprod.txt) >I'm thinking of somehow using the [random] function and a [showif] to an >[index] of the [founditems] but I'm not sure how to also limit this to one >specific category. Also, some categories may only have 13 items? but the >[random] tag is from 1 - 100. Using a showif in this case could lead to a >blank spot on my rendered webpage. John A. Hill Pacific Coast Software http://www.smithmicro.com John Hill

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 question on sub-categories (1997) ARGH! (2004) Grep Question (2003) This is a Test, sorry (1999) Upgrade to web DNA6.0 (2004) Recording size of uploaded file? (2001) [include] (1998) Upgrading old WebCat Database Files (1997) Jimmy (1998) WebCat editing, SiteGuard & SiteEdit (1997) Linked lists and Recursive searching (2003) Hiding Brands (2004) Fufillment e-mail? (1998) WebCat & Liststar (1997) Encryption method used for [encrypt]? (2000) [AppendFile] problem (WebCat2b13 Mac .acgi) (1997) Multiple Passwords (1997) brain teaser with an advanced search (2001) Multiple prices (1997) purchase plugin (1996)