Forums

This topic is locked

Count problems with repeat region

Posted 26 May 2002 03:08:44
1
has voted
26 May 2002 03:08:44 stefano panusa posted:
I have read some of the other count related posts, but couldn't do anything with them. I have all the categories from my table 'subcats' displayed via the Horizontal Looper 2 (Tom Muck). What I'd like to do is have how many articles are in each section. ie.

sectionA (5) sectionB (0) sectionC (3)

and so on. I've managed to get an SQL statement to count the articles, but it displays the same result for each section. Here it is:

SELECT subcat, maincat, count(*)
FROM news
WHERE maincat = MMColParam GROUP BY subcat

so, in the repeat region, I'd like it to count for each section seperately.

Any thoughts?

Thanks!



Edited by - rawveg on 27 May 2002 11:06:37

Replies

Replied 27 May 2002 11:06:15
27 May 2002 11:06:15 Tim Green replied:
This question really should be in the SQL forum.

Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 27 May 2002 11:27:44
27 May 2002 11:27:44 Julio Taylor replied:
hahahaha

this *is* the SQL forum?

i hope this helps.

--J

P.S. i killed kenny
Replied 05 May 2008 18:46:28
05 May 2008 18:46:28 Adam Stockland replied:
Did you ever figure out your COUNT(*) in a repeat region problem? Im having the same trouble. I notice nobody replied to you.....

Thanks
Adam

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
hahahaha

this *is* the SQL forum?

i hope this helps.

--J

P.S. i killed kenny
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Adam Stockland

Reply to this topic