In message <[EMAIL PROTECTED]>, Lenny Davila <[EMAIL PROTECTED]> writes >I have here a mysql statement >SELECT * FROM ad_ads ad left join horse_ads had on ad.ads_id = had.pid WHERE >ads_category = '1' and `ads_title` like '%Lenny%' or `ads_description` like >'%Lenny%' or had.breed = '1' or had.breed = '2' or had.breed != '18' and >had.breed != '19' or had.breed != '20' or had.breed != '-1' > >It should not find where breed is equal to 19 , but it does. These are only >2 of the fields I have in my search criteria. Please let me know the >easiest way to get the statement working correctly.
You are saying SHOW ME WHERE or where breed is not 18, or where breed is not 19. If the breed is 19, then is is shown because you asked for breeds that were not 18. I suspect that you mean (breed is not 18 AND breed is not 19...) -- Pete Clark Sunny Andalucia http://www.hotcosta.com/comm_1.htm
