Hello - I have built a set of message boards.  I need to be able to show the 
number of responses to each thread from the main discussion board window - this 
i have done by using a SELECT COUNT(1) statement grouping the counts by 
messageThread so I use two recordsets - one for the count one for the messages 
that are both ordered/grouped in the same way.  this was great until I needed 
to do further filtering of the messages - I am building for a school and people 
can post messages to primary secondary or whole -
  how could I write one recordset that includes a count as well as the data 
that i was pulling using two:
   
  statement to get the messages the where clause changes according to where you 
work:
   
  SELECT postedBy, messageThread, messageDate, section  FROM tbl_messageboard  
WHERE messageState='parent' AND (section='" + Replace(rs_messages__mysection, 
"'", "''") + "' OR section='whole')  ORDER BY messageThread
   
  counting statement:
   
  SELECT COUNT(1) AS Responses, messageThread  FROM tbl_messageBoard  WHERE 
messageState='response' AND (section='" + Replace(mySection, "'", "''") + "' OR 
section='whole') GROUP BY messageThread
   
  again this changes its where clause according to where you work.
   
  sorry this was really hard to explain - but usually people here kno 
everything so I am hopeful!!
  alex

                
---------------------------------
How much free photo storage do you get? Store your holiday snaps for FREE with 
Yahoo! Photos. Get Yahoo! Photos

[Non-text portions of this message have been removed]





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to