Re: total number of matches

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 23872
interpreted = N
texte = Hi again!I did some additional playing around and came up with the following. It seems to work, but I am now doing 1 esearch to set things up, then an additional search for each category. Does this make sense or am I over doing it?------------------------- Search the database to find out how many active categories are in the database:[search db=^links.db&geUniqueIDdata=0&Categorysumm=t&asCategorysort=1][math]active= [NumFound][/math][/search] Now loop throgh based on how manay categories there are and pulling a total number of matches for each category.[loop start=1&end=[active]&advance=1] [search db=^links.db&eqCategoryData=[index]][NumFound] - [showif [index]=1]Links 1[/showif] [showif [index]=2]Links 2[/showif] [showif [index]=3]Links 3[/showif] [showif [index]=4]Sites 4[/showif] [showif [index]=5]Business Links[/showif] [/search] [/loop]-------------------------The next thing to do (I think) is to set up a convert database to include my category names to convert the current [showif]sDoes this sound like I am on the right track? Funny thing is the [math] context works for me here, but I can get it to work on another template!Thanks! >I am using the following taken from one of the examples for the 'tea >room'. This looks through the database and only shows a category in my >links database if there is an entry in that category. > >What I would like to do is to have a count of how many links are in each >category. I wasn't able to find information on how to do this. I have >looked in the searching section (where the comparisions docs, etc are >located) > >Do I have to actually do additional searches for each category found to >get the [NumFound] value? > >Thanks! > >[search db=^links.db&geUniqueIDdata=0&Categorysumm=t&asCategorysort=1] >[foundItems] >href=Results.tpl?page=display&category=[url][Category][/url]&startat=1[ca >tegory] >[/foundItems] >[/search] > > Associated Messages, from the most recent to the oldest:

    
  1. Re: total number of matches (webcat 1999)
  2. Re: total number of matches (Peter Ostry 1999)
  3. Re: total number of matches (Peter Ostry 1999)
  4. Re: total number of matches (webcat 1999)
  5. total number of matches (webcat 1999)
Hi again!I did some additional playing around and came up with the following. It seems to work, but I am now doing 1 esearch to set things up, then an additional search for each category. Does this make sense or am I over doing it?------------------------- Search the database to find out how many active categories are in the database:[search db=^links.db&geUniqueIDdata=0&Categorysumm=t&asCategorysort=1][math]active= [NumFound][/math][/search] Now loop throgh based on how manay categories there are and pulling a total number of matches for each category.[loop start=1&end=[active]&advance=1] [search db=^links.db&eqCategoryData=[index]][NumFound] - [url][index][/url]&startat=1> [showif [index]=1]Links 1[/showif] [showif [index]=2]Links 2[/showif] [showif [index]=3]Links 3[/showif] [showif [index]=4]Sites 4[/showif] [showif [index]=5]Business Links[/showif] [/search] [/loop]-------------------------The next thing to do (I think) is to set up a convert database to include my category names to convert the current [showif]sDoes this sound like I am on the right track? Funny thing is the [math] context works for me here, but I can get it to work on another template!Thanks! >I am using the following taken from one of the examples for the 'tea >room'. This looks through the database and only shows a category in my >links database if there is an entry in that category. > >What I would like to do is to have a count of how many links are in each >category. I wasn't able to find information on how to do this. I have >looked in the searching section (where the comparisions docs, etc are >located) > >Do I have to actually do additional searches for each category found to >get the [NumFound] value? > >Thanks! > >[search db=^links.db&geUniqueIDdata=0&Categorysumm=t&asCategorysort=1] >[founditems] >href=Results.tpl?page=display&category=[url][Category][/url]&startat=1[ca >tegory] >[/foundItems] >[/search] > > webcat

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:

Word wrapping (1997) Retaining data (2003) trouble updating records in database (1998) practicing safe queries.. (2000) Database monitoring (2005) Re[2]: running WebCatalog under Apache on NT? (2000) Hiding the URL(was Cart ID Duplication) (2001) WebCat2 - storing unformatted date data? (1997) Need help... (1997) blank page from template (1997) Orderfile Encryption (2007) Calendar (1997) Duplicate Cart #'s (1998) Header values are not accepted (1998) RE: Signal Raised (1997) Nesting format tags (1997) Logging purchases (1997) HELP WITH DATES (1997) More on the email templates (1997) Help formatting search results w/ table (1997)