作为以下查询的结果,我有一个带有值的变量
select concat_ws(',',name,age) from table1
inner join table2 on table1.id=table2.id
where table1.height=150
它的结果存储在变量$result中,在另一个页面中我想在新查询中使用这个 $result 在 where 条件如下
select address, state form table1
where (**select concat_ws(',',name,age) from table1 inner join table2
on table1.id=table2.id**)as val=$result
如何在查询中使用此条件?