Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Help SQL Forum Development in ASP

Explorer ,
Apr 26, 2007 Apr 26, 2007
Hi All,

Hopefully you can help me with this one, i've read lots of articles about building forums using access, and i'm aware that there are lots of plugins available. however as my user table is already on the server i would like gto try and build my own forum.

The area that i'm struggling with is, showing either the number of topics in the forum or the number of responces to each topic on a forum / topic overview page.

I have three tables on my server -

Forums.dbo which includes ForumID(PK), ClientID, ForumTitle etc
Topics.dbo which includes TopicID(PK), ForumID, ClientID, TopicTitle etc
Responce.dbo which includes ResponceID(PK), TopicID, ForumID, ClientID, ResponceTitle etc

So far I've managed to build a page that displays a list of forums, using a recordset and a repeat region, this is basically just a repeated region of Forum Titles. Now what i'm trying to do is include a column that highlights the number of topics in each form, so that rather than just being displayed the forum title, our users can see how many topics have been posted before clicking.

This unfortunatly is where i seem to be hitting a brick wall, so would be grateful for advice on how to do this -

Thanks in advance -
TOPICS
Server side applications
285
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 26, 2007 Apr 26, 2007
www.sqlcourse.com
www.sqlcourse2.com

Pay special attention to joins (especially left outer) and aggregates (the
GROUP BY clause).

"GTN1707" <webforumsuser@macromedia.com> wrote in message
news:f0ppcb$akh$1@forums.macromedia.com...
> So far I've managed to build a page that displays a list of forums, using
> a
> recordset and a repeat region, this is basically just a repeated region of
> Forum Titles. Now what i'm trying to do is include a column that
> highlights the
> number of topics in each form, so that rather than just being displayed
> the
> forum title, our users can see how many topics have been posted before
> clicking.


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 26, 2007 Apr 26, 2007
Create a storage procedure that uses count(column name) to count the number of topics in each forum.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 26, 2007 Apr 26, 2007
LATEST
In principle the SQL goes something like

select *,
(
select coun(*) from t2 where t1.id=t2.id
) as TheCount
from t1

--
Jules
http://www.charon.co.uk/charoncart
Charon Cart 3
Shopping Cart Extension for Dreamweaver MX/MX 2004





Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines