I am not sure what you are trying to do. Do you want a join, or a union. Your query is neither, and the results are correct as written.
Dave Gibson wrote:
Hi, I'm getting some unexpected behaviour from a query and was hoping someone could shed some light on whether it's a user error or something else.
I have two tables: customers, oems which both have a companyID field (marked as a foreign key). When I do: SELECT * FROM customers WHERE customers.companyID = 1509 I get 4 rows returned. However, when I do: SELECT * FROM customers,oems WHERE ((customers.companyID = 1509 ) OR (oems.companyID) = 1509) I get 0 rows matched.
Investigation showed that the oems table contains no rows. If I add a rown to it, even one that doesn't match the query above, I get the correct result.
ring any bells with anyone?
Thanks, Dave
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
