Hi i have tables like this :
table entry :
id | total_comments _____________________ 1 | 0 2 | 0 3 | 0 4 | 0
Try:
UPDATE entry SET total_comments = (SELECT COUNT(*) FROM comments WHERE entry.id = comments.eid GROUP BY id)