mysql - Selecting only some relations -


i have 3 tables: a, b, c.
tables , c have fields: id, name , related many-to-many through b table fields a_id, c_id.

how can select entries have relations only entries c called 'mike' ?

select a.*  inner join b on b.a_id = a.id inner join c on c.id = b.c_id c.name = 'mike' 

Comments

Popular posts from this blog

javascript - Slick Slider width recalculation -

jsf - PrimeFaces Datatable - What is f:facet actually doing? -

angular2 services - Angular 2 RC 4 Http post not firing -