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
Post a Comment