php - How to calculate sum of comments through specific id
119
I have two table one isblog
which contains title and description while the second one iscomment
which shows all comments related to specificblog_id
.
blog_id
is a primary key for theblog
table while used as foreign key in thecomment
table.
Answer
Solution:
Suppose your blog id is 1
Answer
Solution:
You can use join, count and group by