Hi all

I'm trying to make up records of publications, in the following format:
[author1] [author2] [author3] [title] [journal]

So I've created 3 tables:

Papers
paper_id (PK)
title
journal

Authors
author_id (PK)
surname

Paper_Author
paper_id (PK)
author_id (PK)
rank

When I run the query

SELECT surname, title, journal
FROM authors NATURAL JOIN paper_author NATURAL JOIN papers

I end up with multiple rows of the same paper, for each of the multiple authors of that paper.

How can I get 1 row per paper, which lists its multiple authors?

Thanks heaps
cobberas

After some research I've discovered that I can accomplish what I need by using either PL/SQL or PHP. Does anyone know whether 1 option is better than the other?

Am I asking questions that are too complicated for this forum, or have I worded it badly? The silence is deafening!!

Thanks
cobberas

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.