I want to get specific column values from one table and use those values to get information from another table.
I'll use this example: both table1 and table2 contains rows with a "name" column.
I want to select the values of all the "name" columns from table1 meeting conditions and then select rows from table2 which contain any of the names selected from table1. The basic idea is below.
SELECT `name` FROM table1 WHERE...
SELECT `name` FROM table2 WHERE `name` IN(names from the above query)
Hopefully this is clear, thanks.