Jump to content

can't get an extra table included in my query


turpentyne

Recommended Posts

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?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.