>> But also consider, if you don't want to ask for
>>
>> select
>> subject,subhead,subsubhead,data2,data3,see_also
>> from npl_detail
>>
>> where (subject like '% asia %'
>> AND NOT subject like '%winter%')
>> OR
<cut>
>> ORDER BY
>> subject, subhead, subsubhead desc
>> limit 0, 15
>>
> THanks for the kind reply. The above statement still
> doesn't return any result. However, if I change it to
> as follows, it will return results:
> select subject,subhead,subsubhead,data2,data3,see_also
> from npl_detail
> where (subject like '% asia %'
> AND subject NOT like '%winter%')
> OR
<cut>
> ORDER BY
> subject, subhead, subsubhead desc
> limit 0, 15
> Logically, there is no difference between this and the
> one you gave me. MySql is new to me. Does it mean any
> difference in MySQL? I am trying more changes.
Oh, I had trouble seeing the difference first. Yes, I think this
will be the reason. But I didn't see the problem and asked Sinisa
about it as such:
> select bla from foo
> where (subject like '% asia %'
> AND NOT subject like '%winter%')
> OR etc.
>
> select bla from foo
> where (subject like '% asia %'
> AND subject NOT like '%winter%')
> OR etc.
>
> The user states that these are logically equivalent - and I think
> he is correct. But the result sets are different.
Sinisa writes:
They are NOT logically equivalent !! Second one is the correct one.
First one means always make 0 out of (NOT subject like "%...%").
Second one means AND subject is not like ...
Herzlich
Werner
--
MySQL in Deutschland: Anpassung, Unterstützung, Schulung für Sie
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Dr. Werner Stürenburg <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Consultant
/_/ /_/\_, /___/\___\_\___/ Bielefeld, Germany
<___/ www.mysql.com +49-5224-997-407 Fax -409
---------------------------------------------------------------------
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