Re: math with a [numfound]

This WebDNA talk-list message is from

2005


It keeps the original formatting.
numero = 62297
interpreted = N
texte = Sorry, I forgot to reset the "howmany" value inside the search. Try this instead: [text]howmany=none[/text] [search db=^eb/ blogs_yes_no.db&eqOriginalBlogIDdatarq=[BlogBy]&eqStatusdatarq=Yes] [text]howmany=[numfound][/text] [showif [numfound]!0] [replace db=^eb/ bloggers.db&eqbloggeriddatarq=[BlogBy]]numposts=[math][howmany]+1[/ math]&last-blog=[BlogID][/replace] success! [/showif] [showif [numfound]=0] sorry, the search found zero matching records. [/showif] [/search] [showif [howmany]=none] sorry, the search failed. [/showif] Sincerely, Kenneth Grome www.kengrome.com On Jun 21, 2005, at 10:46, Kenneth Grome wrote: > If your search fails the value inside the math context will be 1, > that's probably why it's always being set to 1. Try this instead: > > [text]howmany=none[/text] > > [search > db=^eb/ > blogs_yes_no.db&eqOriginalBlogIDdatarq=[BlogBy]&eqStatusdatarq=Yes] > > [showif [numfound]!0] > [replace > db=^eb/ > bloggers.db&eqbloggeriddatarq=[BlogBy]]numposts=[math][howmany]+1[/ > math]&last-blog=[BlogID][/replace] > success! > [/showif] > > [showif [numfound]=0] > sorry, the search found zero matching records. > [/showif] > > [/search] > > [showif [howmany]=none] > sorry, the search failed. > [/showif] ------------------------------------------------------------- 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: math with a [numfound] ( Lester 2005)
  2. Re: math with a [numfound] ( "Mark Pace" 2005)
  3. Re: math with a [numfound] ( Kenneth Grome 2005)
  4. Re: math with a [numfound] ( Kenneth Grome 2005)
  5. math with a [numfound] ( Lester 2005)
Sorry, I forgot to reset the "howmany" value inside the search. Try this instead: [text]howmany=none[/text] [search db=^eb/ blogs_yes_no.db&eqOriginalBlogIDdatarq=[BlogBy]&eqStatusdatarq=Yes] [text]howmany=[numfound][/text] [showif [numfound]!0] [replace db=^eb/ bloggers.db&eqbloggeriddatarq=[BlogBy]]numposts=[math][howmany]+1[/ math]&last-blog=[BlogID][/replace] success! [/showif] [showif [numfound]=0] sorry, the search found zero matching records. [/showif] [/search] [showif [howmany]=none] sorry, the search failed. [/showif] Sincerely, Kenneth Grome www.kengrome.com On Jun 21, 2005, at 10:46, Kenneth Grome wrote: > If your search fails the value inside the math context will be 1, > that's probably why it's always being set to 1. Try this instead: > > [text]howmany=none[/text] > > [search > db=^eb/ > blogs_yes_no.db&eqOriginalBlogIDdatarq=[BlogBy]&eqStatusdatarq=Yes] > > [showif [numfound]!0] > [replace > db=^eb/ > bloggers.db&eqbloggeriddatarq=[BlogBy]]numposts=[math][howmany]+1[/ > math]&last-blog=[BlogID][/replace] > success! > [/showif] > > [showif [numfound]=0] > sorry, the search found zero matching records. > [/showif] > > [/search] > > [showif [howmany]=none] > sorry, the search failed. > [/showif] ------------------------------------------------------------- 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/ 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:

passing cart value (2003) Delete file through browser (1999) Plugin or CGI or both (1997) Validating a date (2000) About WebDNA [well, and so the story ended] (2007) Why WebMerchant not working? (1999) problems with WebCat-Plugin (1997) Aaron kant add (or whatever it was) (2000) Friday night shopping site joke (1997) Need relative path explanation (1997) NT version and O'reily's WebSite (1997) Multiple Passwords (1997) State DB & TIme Zones (2003) Help! (2000) RE: 2nd WebCatalog2 Feature Request (1996) Snake Bites (1997) [WriteFile] problems (1997) DHTML Tag Feature (2000) 'does not contain' operator needed ... (1997) Interfacing WebMerchant to www.fedex.com (1997)