List:General Discussion« Previous MessageNext Message »
From:Santosh Killedar Date:February 17 2008 12:52am
Subject:MYSQL Limit
View as plain text  
I have a MYsql table with following columns Node ID,
Comment ID, Text, Date. Coment ID is primary key. For
each Node ID there are one or more comment IDs
(comments). There is a threshold (max_comments) that a
node can have. How can I delete oldest comments
associated with those nodes where this threshold is
surpassed, such that the number of comments again will
be below threshold for the node. The threshold is
common for all nodes but the current number of
comments is not (since those were added before the
threshold policy established). Please note I want to
delete older comments first, only for nodes above
threshold

thanks
Santosh Killedar


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now. 
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

Thread
MYSQL Limit Santosh Killedar17 Feb
RE: MYSQL Limit Santosh Killedar17 Feb
RE: MYSQL Limit Santosh Killedar19 Feb
  • Re: MYSQL LimitAndy Wallace19 Feb