Re: numfound question

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 61749
interpreted = N
texte = Sorry; I guess it's easy enough to write out the code for you. Add a field called numposted to your blogger.db. Any time you do a [replace] or [append] on the blog.db, do this immediately afterward, bloggerID being the value you are already using in the blog replace: [search db=blog.db&eqbloggeriddatarq=[bloggerid]] [replace db=blogger.db&eqbloggeriddatarq=[bloggerid]]numposted=[numfound][/replace] [/search] Now just pick [numposted] out of your blogger.db anytime you want to show it or sort on it. Terry >How about creating a field in the bloggers called numposted, and >increment that value each time they post. It's just an extra >[replace] context when a posting happens, and makes for easy code >later with no more nested searches just to get a numfound. Or you >could update this field whenever there's action on the blog.db with >a blogger.db search -> blog.db search -> numfound -> replace routine >instead, if it's too much of a hassle to add code to keep the >increment technique accurate due to editing or other issues like >deleted posts, back button abuse, etc. > >Terry > >> I saw this sorta answered in talklist archives but the >>posts were from 2000. Thinking there might be a better >>way perhaps before I start... >> >>First off, I'm using 4.5 on IIS. >> >>I have a small blog type site. >>One db has all the bloggers >>One db has all the blogs >> >>I want to show how many blog entries each of the >>bloggers have posted, and then sort them with the one >>having the most posts first etc... >> >>example: >>blogger8 (7 posts) >>blogger4 (5 posts) >>blogger3 (4 posts) >>etc etc >> >>The only way to do this seems to be to create a temp >>database, (or a maybe daily one since it will be >>accessed many times on the front page.) and then do a >>search and sort etc on that. >> >>summ=T or numfound or other combos of code snippets >>with search and/or an embedded search within weren't >>producing what I want. >> >>Is my assumption correct or has someone come up with >>an easy way to do this? >> >>Or maybe 6 makes this type of solution easier??? >>(sigh) >> >> >>Thanks >> -- -- Terry Wilson | terry@terryfic.com | http://terryfic.com creator of: http://WhosComing.com - a simplified, affordable online reservation system http://WhosBringingWhat.com - online potluck signup sheet -------------------------------------------------------------------------- ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: numfound question: SORTnumfound=ain't gonna happen ( Terry Wilson 2005)
  2. Re: numfound question ( Gary Krockover 2005)
  3. Re: numfound question ( Lester 2005)
  4. Re: numfound question ( "Nitai @ ComputerOil" 2005)
  5. Re: numfound question ( Lester 2005)
  6. Re: numfound question ( "Nitai @ ComputerOil" 2005)
  7. Re: numfound question ( Terry Wilson 2005)
  8. Re: numfound question ( Lester 2005)
  9. Re: numfound question ( Terry Wilson 2005)
  10. Re: numfound question ( Terry Wilson 2005)
  11. Re: numfound question ( "Nitai @ ComputerOil" 2005)
  12. numfound question ( Lester 2005)
Sorry; I guess it's easy enough to write out the code for you. Add a field called numposted to your blogger.db. Any time you do a [replace] or [append] on the blog.db, do this immediately afterward, bloggerID being the value you are already using in the blog replace: [search db=blog.db&eqbloggeriddatarq=[bloggerid]] [replace db=blogger.db&eqbloggeriddatarq=[bloggerid]]numposted=[numfound][/replace] [/search] Now just pick [numposted] out of your blogger.db anytime you want to show it or sort on it. Terry >How about creating a field in the bloggers called numposted, and >increment that value each time they post. It's just an extra >[replace] context when a posting happens, and makes for easy code >later with no more nested searches just to get a numfound. Or you >could update this field whenever there's action on the blog.db with >a blogger.db search -> blog.db search -> numfound -> replace routine >instead, if it's too much of a hassle to add code to keep the >increment technique accurate due to editing or other issues like >deleted posts, back button abuse, etc. > >Terry > >> I saw this sorta answered in talklist archives but the >>posts were from 2000. Thinking there might be a better >>way perhaps before I start... >> >>First off, I'm using 4.5 on IIS. >> >>I have a small blog type site. >>One db has all the bloggers >>One db has all the blogs >> >>I want to show how many blog entries each of the >>bloggers have posted, and then sort them with the one >>having the most posts first etc... >> >>example: >>blogger8 (7 posts) >>blogger4 (5 posts) >>blogger3 (4 posts) >>etc etc >> >>The only way to do this seems to be to create a temp >>database, (or a maybe daily one since it will be >>accessed many times on the front page.) and then do a >>search and sort etc on that. >> >>summ=T or numfound or other combos of code snippets >>with search and/or an embedded search within weren't >>producing what I want. >> >>Is my assumption correct or has someone come up with >>an easy way to do this? >> >>Or maybe 6 makes this type of solution easier??? >>(sigh) >> >> >>Thanks >> -- -- Terry Wilson | terry@terryfic.com | http://terryfic.com creator of: http://WhosComing.com - a simplified, affordable online reservation system http://WhosBringingWhat.com - online potluck signup sheet -------------------------------------------------------------------------- ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Terry Wilson

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:

WebCat2 several catalogs? (1997) Searching (second post) (1999) emailer w/F2 (1997) international time (1997) PSC recommends what date format yr 2000??? (1997) Help! WebCat2 bug (1997) Bug Report, maybe (1997) WC2.0 Memory Requirements (1997) HTML encoding in URLs (1997) Re:Password Authentication - request example (1998) IIS Brain Dead (1998) admin login weirdness (2000) Webstar 1.3.1 PPC (1997) Opinion: [input] should be called [output] ... (1997) 2nd WebCatalog2 Feature Request (1996) Running 2 two WebCatalog.acgi's (1996) WCS Newbie question (1997) WebDNA 4.5.1 Now Available (2003) Line items in table cells (1997) Add htmlarea 3 to SiteBuilder (2004)