List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:June 8 2000 5:52pm
Subject:Re: AND NOT ( X AND Y ) != AND ( !X OR !Y ) ?
View as plain text  
In the last episode (Jun 08), Sander Pilon said:
> I'm probably missing something here, but - in a select -
> 
> Shouldnt
> 
> .. AND (flag.flag != 'hidden' OR flag.value != 1) ...
> 
> be equal to
> 
> .. AND NOT (flag.flag = 'hidden' AND flag.value = 1)
> 
> In MYSQL, They seem not to be. (They should) The second doesnt work,
> the first produces the desired result.

Can flag.flag or flag.value be NULL?  See the manual section titled
"Working with NULL values".

If that's not the problem, do you have a small testcase that
demonstrates the difference?

-- 
	Dan Nelson
	dnelson@stripped
Thread
Running mysql on windows 2000Basil Honikman8 Jun
  • AND NOT ( X AND Y ) != AND ( !X OR !Y ) ?Sander Pilon8 Jun
    • Re: AND NOT ( X AND Y ) != AND ( !X OR !Y ) ?Jeremy Cole8 Jun
      • Re: AND NOT ( X AND Y ) != AND ( !X OR !Y ) ?Jeremy Cole8 Jun
    • Re: AND NOT ( X AND Y ) != AND ( !X OR !Y ) ?Dan Nelson8 Jun
      • RE: AND NOT ( X AND Y ) != AND ( !X OR !Y ) ?Sander Pilon8 Jun
        • Re: AND NOT ( X AND Y ) != AND ( !X OR !Y ) ?Dan Nelson8 Jun
  • Re: Running mysql on windows 2000Carsten Gehling9 Jun
RE: AND NOT ( X AND Y ) != AND ( !X OR !Y ) ?Sander Pilon8 Jun