• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
mySQL count question

#3
[eluser]jedd[/eluser]
[quote author="cinoob" date="1262221216"]
I am creating a forum and would like to display the number of posts within each category. The database structure is as follows:

A category table holds the name of categories
A topics table holds topics for each category
A messages table holds responses to each topic
[/quote]

There are lots of ways of designing forums, so you might want to post your schema to make it a bit clearer on what you're doing.

Are replies substantially different from the first message in a given thread. (I'm guessing what you call a topic is what everyone else calls a thread - ?)

Do messages contain their topic and category identifier, or just their topic identifier?

Post code (as Ben suggested) showing how you already extract a thread's content. It's unclear if you are having trouble working out basic SQL queries where you join tables together, or if you are having trouble using COUNT(id) , for example.


Messages In This Thread
mySQL count question - by El Forum - 12-30-2009, 01:00 PM
mySQL count question - by El Forum - 12-30-2009, 01:06 PM
mySQL count question - by El Forum - 12-30-2009, 04:33 PM
mySQL count question - by El Forum - 12-30-2009, 05:44 PM
mySQL count question - by El Forum - 12-30-2009, 06:27 PM
mySQL count question - by El Forum - 12-30-2009, 09:05 PM
mySQL count question - by El Forum - 12-30-2009, 10:28 PM
mySQL count question - by El Forum - 12-31-2009, 06:45 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.