table: postid|userid|post|replyto
post sql
SELECT * FROM table WHERE postid=12
total replies sql
SELECT COUNT(*) AS total FROM table WHERE replyto=12
the expected result is the "post table" + how many replies to the post. replyto field is the target postid. somehing like :
postid|userid|post|replyto|totalreplies
Is there a possibility to join this 2 queries?
Thanks!