Relations n-m

From: Date: Wed, 05 Jun 2002 15:46:15 +0000
Subject: Relations n-m
References: 1 2 3 4 5  Groups: php.db 
Request: Send a blank email to php-db+get-19623@lists.php.net to get a copy of this message
Hi to everyone, I have a database with three tables books, authors and booksauthors. Books has the fields idbook, title and thers Authors has the fields idauthor,name and others booksauthors has two fields idauthor and idbook Every book can have up to 3 authors and in the booksauthors table there is a row for every author of the book. If book 3 has authors 4,5 and 7 I have three rows (3,5) (3,4) and (3,7) Can anyone tell me what is in mysql the query to get on a single line book,author1,author2, author3? Thanks to everyone Antonio Bernabei

« previous php.db (#19623) next »