Forums

This topic is locked

Number of Replies for a thread problem

Posted 22 May 2002 09:42:32
1
has voted
22 May 2002 09:42:32 b w posted:
I am making a miniforum and I want to include the # of replies to a thread (Topic).
My Tables are

SECTION (like the Forums in UDZone)
THREADS and
MESSAGES.

I have <font color=red>SectionID</font id=red> connecting the tables SECTION and THREADS and <font color=red>ThreadID</font id=red> connecting THREADS table and the MESSAGES table.

I can show all the threads relating to a section ie Ultra Dev by using SectionID as a parameter. I can get the recordset for all the messages for the thread if I can provide the ThreadID. How does it know which threadID it is before it is chosen?
I can't connect it. IT needs the ThreadID and that's the problem.

Is there a way around this? Should I make an SQL statement to join the Threads and Messages tables to find all threads for a section and the number of replies to each thread?

Thanks

Replies

Replied 22 May 2002 11:28:23
22 May 2002 11:28:23 b w replied:
I am thinking about putting the IDThread into a hidden field and then use a stored procedure to pick up the value and create a record set with the IDthread.


Reply to this topic