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.
|
|
|
 |
|