Did you try to use something like this.
LEFT JOIN WLPprofile ON WLPprofile.profileID = WLPbib.profileID)
LEFT JOIN WLPaddress ON WLPaddress.publisherID =
LEFT JOIN WLPcountry ON WLPcountry.countryID =
The other thing that may help is to rearange the order of the tables in the
FROM clause. Please check if some of the joins return more than one result -
if you have more than one address for a publisher the query will return one
row for every address.
Hope this helps
From: Mike Gifford <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Thursday, July 12, 2001 4:31 AM
Subject: [PHP-DB] Left Join is producing duplicate results - MySQL &
>I posted this to the general list this morning & got a couple of good
>they weren't able to actually fix the problem, so I'm posting here to the
>I'm making some headway on joining three MySQL tables.
>However, when I run this query:
> FROM WLPbib
> LEFT JOIN WLPprofile ON WLPprofile.profileID = WLPbib.profileID
> LEFT JOIN WLPaddress ON WLPaddress.publisherID =
> LEFT JOIN WLPcountry ON WLPcountry.countryID =
>I now get results in triplicate. ie. I'm getting three copies of the same
>title, firstName, organization, etc....
>I somehow suspected that this should be the result with LEFT JOIN, but I'm
>sure how to return a query without duplication.
>This is far better than what I had this morning (which was no response from
>Thanks. I'm new to joining tables...
>Someone wrote back suggesting that SELECT DISTINCT could be used to to the
>Another person suggested that using UNIQUE(profileID) would make it look
> I wasn't sure how to use UNIQUE with the last JOIN as it isn't directly
>Any suggestions would be useful.
>Mike Gifford, OpenConcept Consulting, http://openconcept.ca
>Offering everything your organization needs for an effective web site.
>Abolish Nuclear Weapons Now!: http://pgs.ca/petition/
>It is a miracle that curiosity survives formal education. - A Einstein
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]