Re: Charting records by state

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 27220
interpreted = N
texte = I am not commenting on the speed of your code, but you get rid of white space in the HTML by wrapping the carriage returns with the [!] context.like so- code....[!]¬ [/!]....more code....[!]¬ [/!]....more code...[!]¬ [/!]etc.Would be nice to have a new context in 4.0 that just did all that automagically- [noWhite] code more code more code [/noWhite]-JohnChuck Rice wrote:> I came up with the following routine to display a summary of > database records by state. It works well, but I have a > few questions. > > 1) It does a lot of searches. It runs fast now, but I am not > sure how it will respond when the database grows. Is there a > way to make it more efficent? > > 2) When you run it and view page source, you see lots and lots > of blank lines. They do not affect the display, but the speed? > How do I get rid of them. > > 3) Is there a better way to make a chart? > > -Chuck- > > [math show=f]maxcols=10[/math] > > [search db=Registry.db&statesumm=T&statesort=1&neSKUdata=not_found] > [founditems] > [search db=Registry.db&eqstatedata=[state]] > [founditems][/founditems] > [showif [numfound]>[maxcols]] > [math show=f]maxcols=[numfound][/math] > [/showif] > [/search] > [/founditems] > [/search] > > [math show=f]maxcols=[maxcols]+1[/math] > >
> [search db=Registry.db&statesumm=T&statesort=1&neSKUdata=not_found] >
Hauntists by State > > > > > > [loop start=1&end=[maxcols]&advance=1] > > [/loop] > > [founditems] > > > > [/search] > [/founditems] > >
StateCount[index]
[state] > [search db=Registry.db&eqstatedata=[state]] > > [founditems][/founditems] > [numfound] >   
> [/search] >
> __________________________________________________________________________ > Chuck Rice > > > > > ------------------------------------------------------------- > Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. > To end your Mail problems go to . > > 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 ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .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 Associated Messages, from the most recent to the oldest:

    
  1. Re[4]: Charting records by state (jpeacock@univpress.com 2000)
  2. Re[3]: Charting records by state (Kenneth Grome 2000)
  3. Re[3]: Charting records by state (jpeacock@univpress.com 2000)
  4. Re[2]: Charting records by state (Kenneth Grome 2000)
  5. Re: Charting records by state (Kenneth Grome 2000)
  6. Re[2]: Charting records by state (Webcat 2000)
  7. Re[2]: Charting records by state (jpeacock@univpress.com 2000)
  8. Re: Charting records by state (John Butler 2000)
  9. Charting records by state (Chuck Rice 2000)
I am not commenting on the speed of your code, but you get rid of white space in the HTML by wrapping the carriage returns with the [!] context.like so- code....[!]¬ [/!]....more code....[!]¬ [/!]....more code...[!]¬ [/!]etc.Would be nice to have a new context in 4.0 that just did all that automagically- [noWhite] code more code more code [/noWhite]-JohnChuck Rice wrote:> I came up with the following routine to display a summary of > database records by state. It works well, but I have a > few questions. > > 1) It does a lot of searches. It runs fast now, but I am not > sure how it will respond when the database grows. Is there a > way to make it more efficent? > > 2) When you run it and view page source, you see lots and lots > of blank lines. They do not affect the display, but the speed? > How do I get rid of them. > > 3) Is there a better way to make a chart? > > -Chuck- > > [math show=f]maxcols=10[/math] > > [search db=Registry.db&statesumm=T&statesort=1&neSKUdata=not_found] > [founditems] > [search db=Registry.db&eqstatedata=[state]] > [founditems][/founditems] > [showif [numfound]>[maxcols]] > [math show=f]maxcols=[numfound][/math] > [/showif] > [/search] > [/founditems] > [/search] > > [math show=f]maxcols=[maxcols]+1[/math] > >
> [search db=Registry.db&statesumm=T&statesort=1&neSKUdata=not_found] >
Hauntists by State > > > > > > [loop start=1&end=[maxcols]&advance=1] > > [/loop] > > [founditems] > > > > [/search] > [/founditems] > >
StateCount[index]
[state] > [search db=Registry.db&eqstatedata=[state]] > > [founditems][/founditems] > [numfound] >   
> [/search] >
> __________________________________________________________________________ > Chuck Rice > > > > > ------------------------------------------------------------- > Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. > To end your Mail problems go to . > > 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 ------------------------------------------------------------- Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server. To end your Mail problems go to .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 John Butler

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:

Numbers only code (2000) Configuring E-mail (1997) Comparing two fields so the match (1998) Is there a way......... (2000) what characters are replaced for tab and CR? (1998) authenticate and password (1998) [GROUPS] followup (1997) [include] affect on filepaths for links? (1997) Permissions Ignored - PLEASE HELP (2003) Showif, Hideif reverse logic ? (1997) [WebDNA] Nginx (2010) HTML Mail & Line breaks... (2004) bug in [SendMail] (1997) WC 4.0 (2000) Is it possible to pause or wait a process (2000) When do we get to request new features? (1999) Bug Report, maybe (1997) Adding multiple items to a DB from a search. (1998) Banners (1997) Some Questions (1997)