On my site (http://www.soemme.no/index2.php?numero=1)I have a section with news and stuff, with the posibility for users to add comments to each "news story". What I'm trying to do is counting how many comments there are for each story and presenting it in the link to the comments section like this : [comments (6)].
I've found that this should be possible to do with adding a query for each news story (repeat pattern thing?), and counting the records for each query. This will however lead to a high strain on the server, and a slow site, wich of course is no good.
What I want to do is to have one query wich collects the "title" field from the entire comments table (for all the news storys) and then have a litle bit of code for each story that counts how many comments there are for that title.
Can this be done, if it can I would really appreciate any help.
And BTW, I'm new in here: hello every one
-Vidar