My SQL is pretty sketchy so I was wondering if someone could shed some light on my problem.
I have two tables, one calles PLANTS and one called DATA.
The PLANTS table contains two columns, one is plant names and the other is a unique identifies (1, 2, 3...).
In the DATA table I have a few columns with plant information, one of which is a the unique identifier from the PLANTS table, so I know which plant the record set is referring to.
Now when I run a SELECT * FROM DATA I obviously get back everything from the DATA table and I print this to an HTML table. What I want to do is print out the name of the plant from the PLANT table, rather than the unique identifier from the DATA table.
So my question is: Is there a way to cross-refernce the plant ID number from the DATA table and replace it with the plant name (using JOIN or AS maybe)?
Thanks,
Matt
I have two tables, one calles PLANTS and one called DATA.
The PLANTS table contains two columns, one is plant names and the other is a unique identifies (1, 2, 3...).
In the DATA table I have a few columns with plant information, one of which is a the unique identifier from the PLANTS table, so I know which plant the record set is referring to.
Now when I run a SELECT * FROM DATA I obviously get back everything from the DATA table and I print this to an HTML table. What I want to do is print out the name of the plant from the PLANT table, rather than the unique identifier from the DATA table.
So my question is: Is there a way to cross-refernce the plant ID number from the DATA table and replace it with the plant name (using JOIN or AS maybe)?
Thanks,
Matt