|
Posted by Paul Waring on 06/05/05 23:49
On 6/5/05, Jack Jackson <jackson.linux@gmail.com> wrote:
> I'd like to stop the NY Sun from appearing twice! What have i missed here?
There's nothing wrong with your PHP code as such (although you could
filter out duplicates there if you wanted), all you should need to do
is add the DISTINCT keyword to your SQL query on the appropriate colum
like so:
SELECT art.art_id,art.publisher_id, DISTINCT publisher.publisher_name,
FROM art
LEFT JOIN publisher
ON publisher.publisher_id=art.publisher_id
I believe the DISTINCT keyword is part of the SQL standard, so it
should work on MySQL, Postgres etc.
Hope this helps.
Paul
--
Rogue Tory
http://www.roguetory.org.uk
Navigation:
[Reply to this message]
|