What I want to do is select everything out of ad_listing that have the same postalcode as what the condition for the postal_codes table depicts (WHERE postal_codes.Latitude >= 42.6145300852 AND postal_codes.Latitude <= 43.3373659148 AND postal_codes.Longitude >= -82.8767447212 AND postal_codes.Longitude <= -81.8945312788)
This is the query I cam up with, but have not had any luck.
SELECT * FROM ad_listing LEFT JOIN postal_codes ON ad_listing.postalcode=postal_codes.postalcode WHERE postal_codes.Latitude >= 42.6145300852 AND postal_codes.Latitude <= 43.3373659148 AND postal_codes.Longitude >= -82.8767447212 AND postal_codes.Longitude <= -81.8945312788
Any sugestions?
This is the query I cam up with, but have not had any luck.
SELECT * FROM ad_listing LEFT JOIN postal_codes ON ad_listing.postalcode=postal_codes.postalcode WHERE postal_codes.Latitude >= 42.6145300852 AND postal_codes.Latitude <= 43.3373659148 AND postal_codes.Longitude >= -82.8767447212 AND postal_codes.Longitude <= -81.8945312788
Any sugestions?