Re: [PHP] mySQL relations query

2002-11-05 Thread Marco Tabini
Well, if both tables are in the same database: select * from books inner join publishers on books.publisherid = publishers.publisherid this assumes that the key for the publisher is publisherid and that publisherid also appears in the book table. This gives you a result set that contains the a

[PHP] mySQL relations query

2002-11-05 Thread Edgard Berendsen
I know this can be a little out of topic but: I have a books database and each book belongs to a publisher. There is also a publisher database with information like (name, location, etc). In the books database there is a key to identify the publisher. I need a mySQL query for showing each book wi