i have a query that its result is array like $a=[1, 3, 5]
i need another query which return records from table1 that all b values are in $a=[1,3, 5] so result for this sample is table1.id=1, 2
can i implement this with a query or i have to use php code like array_diff() to check difference between b column and $a?
**table1**
id
-----------
1 ...
2 ...
3 ...
**table 2**
table1_id b
------------
1 1
1 3
2 1
3 1
3 4
4 1
4 3
4 5
4 4
implode()in PHP and anIN()condition im MySQL. You can also use aJOIN.