Hi All

I am trying to compare information in 2 different tables and return
matches. The problem is that this query only returns the listings where
I want it to return a row from AutoEmail when it finds a match.

What am I doing wrong?

SELECT * FROM AutoEmail, listings  WHERE ((listings.prop_style LIKE
'%AutoEmail.prop_style%') AND (listings.price <= AutoEmail.range) AND
(listings.bedrooms <= AutoEmail.bedrooms) AND (listings.bathrooms <=
AutoEmail.bathrooms) AND (listings.garage LIKE '%AutoEmail.garage%') AND
(listings.fpropover LIKE '%AutoEmail.feature%') AND (listings.location
LIKE '%AutoEmail.location%')) AND ((AutoEmail.residential =
listings.residential) OR (AutoEmail.multi = listings.multi) AND
(AutoEmail.farm = listings.farm) OR (AutoEmail.waterfront =
listings.waterfront) OR (AutoEmail.commercial = listings.commercial) OR
(AutoEmail.vacant = listings.vacant))

--
Cheers!
Ken Tuck
EyeCreate Inc.
Net~Solutions
Design - Hosting - E-Commerce
[EMAIL PROTECTED]
http://www.eyecreate.net/
ph: 705.755.1120
fx: 705.743.9259



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