fctester123456
8 years agoAdept
LIQL: using query result as in condition for another
is there any way to use result from first query as condition in second query.
e.g.
select id from boards where parent_category.id ='xxxxx'
this query return id list : aaa ,bbb ,ccc
i want to get all message in the 3 board
select * FROM messages WHERE board.id in ( id list from first query )
instead of
select * FROM messages WHERE board.id in ( 'aaa' ,'bbb' ,'ccc' )
I plan to loop the query 1 and query 2 for different parent category.