My query is:
SELECT * FROM table WHERE id IN (1,2,3,4);
I use it for usergroups and a user can be in more than one group. but it seems that
you must have record in table or array record in database.
example:
SELECT * FROM tabel_record WHERE table_record.fieldName IN (SELECT fieldName FROM table_reference);