Hi Joe,
I effectively used your first suggestion. I used a SELECT
query similar to
your and added a WHERE clause that linked the parent and
child recordset. I
then placed the output code in the repeat region and, hey
presto, it worked!
Thanks for the Tom Much suggestion. If I need something like
this in the
future, i'll know where to look.
Minty
"Joe Makowiec" <makowiec@invalid.invalid> wrote in
message
news:Xns99D0C5D997AADmakowiecatnycapdotrE@216.104.212.96...
> On 21 Oct 2007 in macromedia.dreamweaver.appdev,
Mintyman wrote:
>
>> I'm trying to create a nested repeat region to
display a list of
>> categories and, in brackets afterwards, a count of
the number of
>> sub-categories contained in it E.g.
>>
>> Cats (12)
>> Dogs (43)
>> Fish (92)
>> Etc
>>
>> I have managed to create my repeat region ok because
as soon as I
>> drop a field in from the recordset, it loops through
them all and
>> displays them correctly. However, when I try and
simply write out
>> the total number of records found, it doesn't
display anything.
>
> If you don't want the sub-elements in the categories,
just the category
> name and count, do something like this in SQL:
>
> SELECT category, COUNT(category) AS myCount
> FROM myTable
> GROUP BY category
> ORDER BY category;
>
> If what you want something more like:
>
> Cats
> Calico
> Maine Coon
> Teal Point
> Total Cats: 3
> Dogs
> Beagle
> Boxer
> Bulldog
> Golden Retriever
> Total Dogs: 4
>
> Look for a 'nested repeat region' extension - I think
Tom Muck has such -
> and then implement a counter within the region.
>
> --
> Joe Makowiec
>
http://makowiec.net/
> Email:
http://makowiec.net/contact.php