OCA\Richdocuments\Db::buildInQuery PHP Method

buildInQuery() protected method

Build placeholders for the query with variable input data
protected buildInQuery ( string $field, Array $array ) : String
$field string field name
$array Array data
return String `field` IN (?, ?...) placeholders matching the number of elements in array
    protected function buildInQuery($field, $array)
    {
        $count = count($array);
        $placeholders = array_fill(0, $count, '?');
        $stmt = implode(', ', $placeholders);
        return '`' . $field . '` IN (' . $stmt . ')';
    }