Harald,
Wednesday, July 03, 2002, 11:06:36 PM, you wrote:

HK>  >Description:

HK> I use LEFT JOIN to join together two tables. And (for some 'complex' 
HK> reason) I want to add additional conditions into the join_condition-part 
HK> (and not in the WHERE part where it would belong to). But these additional 
HK> conditions seem to be ignored just as if they weren't there. If I cut the 
HK> 'ON'-part and move conditions to the 'WHERE' all goes the way it should.

HK> Changing the join method from LEFT JOIN to INNER JOIN does fix the problem 
HK> - yes but alas I need a LEFT JOIN in this case.

HK> The manual says
HK>    "The ON conditional is any conditional of the form that may be used in a 
HK> WHERE clause."
HK> So it _should_ be allowed to do the things that I do...

The manual also says:
       You should never have any conditions in the ON part that are
       used to restrict which rows you have in the result set. If you
       want to restrict which rows should be in the result, you have
       to do this in the WHERE clause.

Clause ON determines join condition between tables. Matching is done according to
columns that are specified in ON clause.

'person.deleted=0' and 'room.deleted=0' conditions are not used for joining tables,
they are used to confine rows in the result set.

HK> Maybe this is all my fault - so please be patient. But in any case: Thank 
HK> you very much for spending time with my problem!




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to