I have found a lot of answers regarding joining two SELECT
statements using UNION
. However, I am trying to do something like this:
$sql = "SELECT 'column'
FROM 'table'
WHERE 'id' = (
SELECT 'column'
FROM 'another_table'
WHERE 'id' = 'something_specific'
)"
Can this not be done or am I doing something wrong?
Thanks