Lo everyone,
I seem to be having a problem with the structuring of my query - more
specifically, with the WHERE clause...
mysql> SELECT ZoneName
-> FROM CompanyDNSZones
-> LEFT JOIN CompanyDetails ON
CompanyDetails.CompanyID=CompanyDNSZones.CompanyID
-> WHERE CompanyDetails.CompanySuspended='0' AND
-> CompanyDNSZones.ZoneName='megalan.co.za' AND
-> CompanyDNSZones.ZoneServices LIKE '%HasMail%' OR
-> CompanyDNSZones.ZoneServices LIKE '%HasMailingList%';
+---------------------+
| ZoneName |
+---------------------+
| megalan.co.za |
| lists.megalan.co.za |
+---------------------+
2 rows in set (0.01 sec)
How do I get it to only return the item specified in the WHERE clause?
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?
--
me
PS: Just for interest takes, can LEFT / RIGHT / a combination of LEFT &
RIGHT joins be used to cross-reference three or more tables, or is it
limited to 2 tables only?
---------------------------------------------------------------------
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