Whoops...code does not work if one user makes more than one comment on a single itemid.
Nuts. It counts the user's own later posts.
Will think on it more.
The queryy is trivial for a single itemid and single userid.
For example:
Code:
mysql> select COUNT(*) FROM itemcomments AS C,
-> (SELECT Max(dateadded) AS lastcomment FROM itemcomments where itemid = 383 and userid = 100 ) AS M
-> WHERE C.itemid = 383 AND C.userid <> 100 AND C.dateadded > lastcomment;
+----------+
| COUNT(*) |
+----------+
| 2 |
+----------+