开发者

Trying to make a query that takes two tables into account

I am looking for some guidance.

I am trying to select the following

From tbl_leaguetables i want to select us开发者_开发百科er, team, league

league is connected to tbl_leagues

ie if league = 15, in tbl_leagues, the id will be 15.

in that table i then want to get game, type, name

but only where the format = "yes"

How can this be done? I really dont know where to start!!!


select lt.user, lt.team, lt.league, 
    l.game, l.type, l.name
from tbl_leaguetables lt
inner join tbl_leagues l on lt.league = l.id
where l.format = 'yes'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜