Re: MySQL - Left Join Question
| From: | user at domain dot invalid | Date: | Wed, 26 Jun 2002 06:34:18 +0000 |
| Subject: | Re: MySQL - Left Join Question | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-20124@lists.php.net to get a copy of this message | ||
You might think about adding comparison operators to the statement to help narrow the search.
i.e. A LEFT JOIN B
ON a.id = b.id WHERE a.value = b.value AND a.value2 = b.value2 OR a.value3 = b.value3The MySQL website provides documentation dealing with comparison operators and the WHERE statement. Monty wrote:
A LEFT JOIN B ON a.id = b.id If I issue the above MySQL SELECT condition and there is more than one record in B that could potentially be joined to a record in A, is there a way to tell MySQL which of the two records from B to choose for the join with A?