Re: Left Join is producing duplicate results - MySQL & relational tables
| From: | Mike Gifford | Date: | Thu, 12 Jul 2001 13:54:06 +0000 |
| Subject: | Re: Left Join is producing duplicate results - MySQL & relational tables | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-10336@lists.php.net to get a copy of this message | ||
Hello Dobromir,
Dobromir Velev wrote:
Did you try to use something like this. mysql_query("SELECT DISTINCTThe only item that I want to have distinct is the first one. However, I think that Matthew's response (to your response) is working now.WLPbib.bibID,
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.Actually, I'd like to have more than one record (WLPprofile rather than WLPaddress in this case) per bibliography item (WLPbib) You see a book can have many authors, but I'm not sure how to build the tables so that I can link to multiple authors.. Any sugestions? Right now there is one profileID listed. I don't know how to organize the data so that WLPbib.profileID can equal WLPprofile.profileID=3, WLPprofile.profileID=7, & WLPprofile.profileID=10232. Would Matthew's suggestion work in places where there are multiple profiles (authors) referred to within the bib table? Mike -- 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