Hello, folks,

I've got an issue with a query.  It's returning 95 rows, when there are only
3 that should be returned.  Actually, it's returning many many copies of
each of the rows that are supposed to be returned, and nothing that
shouldn't be, so at least it's grabbing the correct information, but I'm
concerned with the number of duplicates.

The query looks like this:

SELECT c.store_name, c.customer_id, c.area_code, c.phone_prefix,
c.phone_suffix, c.address_1, c.address_2, c.zip, c.zip_suffix from customers
as c, manufacturer_to_customer as mtc, vendor_to_customer as vtc WHERE
c.city='Dallas' AND c.state='TX' AND ((c.customer_id=vtc.customer AND
vtc.vendor='8') OR (c.customer_id=mtc.customer AND mtc.manufacturer='2'))
ORDER BY c.store_name

Any suggestions on how I'm screwing up building this query?

Bob


---------------------------------------------------------------------
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

Reply via email to