View Single Post
06-07-2012, 01:12 PM
#1
Dan is offline Dan
Dan's Avatar
Status: Request a custom title
Join date: Feb 2005
Location:
Expertise:
Software:
 
Posts: 3,164
iTrader: 15 / 86%
 

Dan is an unknown quantity at this point

  Old  A column that counts the number of index entries on a specific index?

Bare with me as I try to explain.

I have two tables: Topics and Comments. topic.id is indexed to comment.topicid, for every comment that is indexed to topic.id I want to +1 a column in my comments table, called comments.replies.

I can do this incredibly easy with PHP, however, I'm left wondering if it's at all possible with just MySQL?

Here's my relationship diagram for better understanding: http://i.imgur.com/1nICb.png