MySQL(内/左/右)关联多张表

mysql (内/左/右)关联多张表

1
2
3
4
5
6
-> select a.id,a.title,b.class_name as '所属栏目',c.source,d.author 
-> from ck_article as a
-> inner join ck_category as b on a.class_id = b.id
-> left join ck_article_source as c on a.source_id = c.id
-> left join ck_article_author as d on a.author_id = d.id
-> where field='condition';