coupe-r Posted January 27, 2010 Share Posted January 27, 2010 Hey Guys, What I am trying to do is populate a drop down box with properties (Addresses), only if the # of occupants have not been reached. If a property has 2 occupants and only 1 tenants has that property id, it should still be populated. Property Tenants Property_id Teanant_id occupants property_id SELECT * FROM property LEFT JOIN tenants ON property.property_id = tenants.property_id WHERE ......................... Clueless on how I compare the count of tenants.property_id's and property.occupants. Please help Quote Link to comment Share on other sites More sharing options...
fenway Posted January 28, 2010 Share Posted January 28, 2010 You'll need to count them separately. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.