I am working on a website where i have three tables
1:- Book Author
2:- Book type
3:- Book relationship
My first table have following fields ------------------- id Author_name 1 abc 2 xyz ------------------
Second table id book_type 1 Politics 2 Religious ------------------
Third table id book_type_id author_id 1 1 1 2 1 2 ----------------------
On my webpage when a visitor clicks on a category i am getting the book_type. Now i want to get the author name having category 1 from author name table. I think i have explained clearly. if any one can solve this issue… Thanks
select * from book_author where id in (select author_id from book_relationship where book_type_id = 'selected_category_id')