Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,471
There are 1617 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

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

Thread title: A column that counts the number of index entries on a specific index?
     
    Thread tools Search this thread Display Modes  
Prev Previous Post   Next Post Next
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

     


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed