php - mysql3 table query
阿神
阿神 2017-06-30 09:54:49
0
2
879

【star star list】
id name
There are N many stars, self-increase ID
【sing song list】
id name star_id
N many songs
【movie movie Table】
id name star_id
N多电影

Query how many songs and movies each star has in total
name cout_sing count_movie

阿神
阿神

闭关修行中......

reply all(2)
代言

select conut(tb1.id) as singnum
from star as tb3
left join sing as tb1 on tb1.starid=tb3.id
where tb3.id=somenoe

迷茫

select a.name,count(b.id) as singnum,count(c.id) as movienum
from star as a
left join sing as b on a.id=b.star_id left join movie as c on c.star_id=a.id group by b.id,c.id.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template