Usa invece 'where', 'where in' - dove in ti consente di cercare in array.ad esempio:
Select id from member where parent_id IN (here array ($y) )
Usa invece 'where', 'where in' - dove in ti consente di cercare in array.ad esempio:
Select id from member where parent_id IN (here array ($y) )