protected function buildInQuery($field, $array) { $count = count($array); $placeholders = array_fill(0, $count, '?'); $stmt = implode(', ', $placeholders); return '`' . $field . '` IN (' . $stmt . ')'; }