Hi, -> WHERE CompanyDetails.CompanySuspended='0' AND -> CompanyDNSZones.ZoneName='megalan.co.za' AND -> CompanyDNSZones.ZoneServices LIKE '%HasMail%' OR -> CompanyDNSZones.ZoneServices LIKE '%HasMailingList%';
> I explictly tell MySQL in my where clause to only return results where > CompanyDNSZones.ZoneName='megalan.co.za', so where does it fall out > returning lists.megalan.co.za as well? It's that OR that makes the mess. Try with: -> WHERE CompanyDetails.CompanySuspended='0' AND -> CompanyDNSZones.ZoneName='megalan.co.za' AND -> (CompanyDNSZones.ZoneServices LIKE '%HasMail%' OR -> CompanyDNSZones.ZoneServices LIKE '%HasMailingList%'); Regards, Sasa »mysql, select, database« --------------------------------------------------------------------- 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