Hello,
i have this constellation on tables in my database:
Table A
id|content
Table B
table_a_id|tabl e_c_id
Table C
id|name
My question is:
How to write a select like this:
Select content from table_a inner join table_b on (table_a.id = table_b.table_a _id)
inner join table c on (table_b.table_ c_id = table_c.id)
Where name = "nameA" and name = "nameB".
So that i can get that row's from Table A that matches the two names in this n:m constellation. With this Sql-Statement i get of course nothing, with an or i get the row's from Table A with either nameA or nameB.
Thank's for every answer.
i have this constellation on tables in my database:
Table A
id|content
Table B
table_a_id|tabl e_c_id
Table C
id|name
My question is:
How to write a select like this:
Select content from table_a inner join table_b on (table_a.id = table_b.table_a _id)
inner join table c on (table_b.table_ c_id = table_c.id)
Where name = "nameA" and name = "nameB".
So that i can get that row's from Table A that matches the two names in this n:m constellation. With this Sql-Statement i get of course nothing, with an or i get the row's from Table A with either nameA or nameB.
Thank's for every answer.
Comment