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:

Other tags inside the founditems context? (1998) Error Lob.db records error message not name (1997) Serving images from databases (1998) database freeze (1997) japanese characters (1997) Cold Fusion Buster (1997) PIXO support (1997) Here we go again... (2006) [WebDNA] unsubscribe (2008) WYSIWYG HTML editor for use in browser (2001) Document Contains No Data! (1997) Multiple catalog databases and showcart (1997) RE: Automatic Forwarding using WebCat (1997) # fields limited? (1997) catagories (1997) [username][password] not showing up! HELP! (1999) Help name our technology! (1997) SERIAL NUMBER PROBLEM *AGAIN*!!! (1998) multiple search commands (1997) Search syntax question (1998)