turpentyne Posted February 9, 2012 Share Posted February 9, 2012 I've got this query, which works fine: SELECT plant_term_id, plant_id, low_id, high_id, plant_measures.unit, measurement_terms.plant_term AS tpart FROM plant_measures JOIN measurement_terms ON plant_measures.plant_term_id = measurement_terms.id WHERE plant_id =134660 But I need to get in two extra fields from another table called measurements I want to get the measurements.number field to be included where it matches low_id and where it matches high_id I thought I could just add another join statement, but it doesn't seem to work - I think because the measurement table doesn't have a plant_id. It's just a list of measurements. thoughts? Quote Link to comment https://forums.phpfreaks.com/topic/256704-cant-get-an-extra-table-included-in-my-query/ Share on other sites More sharing options...
turpentyne Posted February 9, 2012 Author Share Posted February 9, 2012 Scratch that! I figured it out. I was pulling from a wrong field. neeeever mind! Quote Link to comment https://forums.phpfreaks.com/topic/256704-cant-get-an-extra-table-included-in-my-query/#findComment-1316019 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.