I have a table like so :
| thread_id | user_id |
+-----------+---------+
| 1 | 1 |
| 1 | 2 |
| 2 | 1 |
| 2 | 3 |
| 3 | 1 |
| 3 | 3 |
| 3 | 2 |
...
How would I check if an array combination exists and belongs to the same thread ?
Ex:
1,3 => return true
3,1,2 => return true
1,4,2,3 => return false
Arrays could contain several hundred id’s, with hundreds of thounds of threads.
Where
nis the count of items in the list / array.Then in your script:
truefalse