books select

1
2
3
4
5
6
7
8
9
SELECT
books.*,
GROUP_CONCAT(authors.authors_id) authors_id,
GROUP_CONCAT(authors.authors_name) authors_name
FROM
books
JOIN books_authors ON(books.book_id = books_authors.b_id)
LEFT JOIN authors ON(authors.authors_id = books_authors.a_id)
GROUP BY books.book_id