Re: How to find 100 most recent additions.

This WebDNA talk-list message is from

1997


It keeps the original formatting.
numero = 14277
interpreted = N
texte = >How can I determine the number of records in a database; and then randomly >select one of the records if there are more than 100 items returned.>[listfiles db=database.db] >[showif [random]=[index]] field values [/showif] >[/listfiles] Okay, first of all, it looks like you're trying to use [listfiles] to search a database. That's the wrong use of [listfiles], so I'm not sure how you got the WebDNA code above to do anything for you. (?)Try this instead:[showif [search db=xxx.db&nefielddata=[blank]][numfound][/search]>100] [search db=xxx.db&nefielddata=[blank]&rafieldsort=1&max=1] [founditems] the random record shows up here. [/founditems] [/search] [/showif]Sincerely, Ken Grome WebDNA Solutions 808-737-6499 http://www.smithmicro.com/webdnasolutions/. Associated Messages, from the most recent to the oldest:

    
  1. Re: How to find 100 most recent additions. (Kenneth Grome 1997)
  2. How to find 100 most recent additions. (dwilfong@world-wide-art.com (David Wilfong) 1997)
>How can I determine the number of records in a database; and then randomly >select one of the records if there are more than 100 items returned.>[listfiles db=database.db] >[showif [random]=[index]] field values [/showif] >[/listfiles] Okay, first of all, it looks like you're trying to use [listfiles] to search a database. That's the wrong use of [listfiles], so I'm not sure how you got the WebDNA code above to do anything for you. (?)Try this instead:[showif [search db=xxx.db&nefielddata=[blank]][numfound][/search]>100] [search db=xxx.db&nefielddata=[blank]&rafieldsort=1&max=1] [founditems] the random record shows up here. [/founditems] [/search] [/showif]Sincerely, Ken Grome WebDNA Solutions 808-737-6499 http://www.smithmicro.com/webdnasolutions/. Kenneth Grome

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:

Not really WebCat (1997) Sort Order on a page search (1997) Sending htmlmail (2007) Will webdna execute before a [redirect]? (1999) [WebDNA] Version 7 Config problem (2011) pop up menu's (1998) Log-in Scheme (2003) problems with 2 tags (1997) A Global Variable (1997) ooops...WebCatalog [FoundItems] Problem - LONG - (1997) Document Contains No Data! (1997) WebDNA & Suse Linux (2004) Webcat causing crashes left and right! (1997) Dubble Sku's in a Database (1999) [off] Promotions Co? (1997) wild question (1998) AOL and webcat (1998) WebCat2 several catalogs? (1997) all records returned. (1997) searchable list archive (1997)