CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 number of items in category

Print topic Send  topic

Author Message
Pierre Henriot
Posted: 09/05/2002, 5:20 AM

Hello,

I would like to know how to do the following in codecharge:

I have a database with categories (no tree).
For example lets say I got items of colors blue and white.

I would like to display in a menu form both types of items with the number of occurences in the database.

Blue (number)
White (number)

How do I do this?

I tried to adapt the bookstore/yello pages examples, but it doesn't work.


Thank you for help,
Pierre.
PH
Posted: 09/06/2002, 12:17 PM

so, nobody knows??
george L.
Posted: 09/07/2002, 3:08 PM

Did you look at this article?
http://www.gotocode.com/art.asp?art_id=189&
Pierre Henriot
Posted: 09/10/2002, 10:21 PM

Yes, thats exactly what I want to do!

But in CC, not CCS.
What would be the equivalent code for CC?

PH
Nicole
Posted: 09/14/2002, 4:26 AM

Pierre,
It is not too hard. You need some code in form Before Show event. Here is sample code for ASP:
rec_count = dlookup("table_name", "count(*)", "category_id_field = " & ToSQL(fldcategory_id, Number))
flditem_field = flditem_field & " (" & rec_count & ")"

where "item_field" is filed to be displayed on the form, "category_id_field" the hidden field on the form that stores category_id value.

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.