$threshold = is_array($threshold) ? 'WHERE ' . implode(' AND ', $threshold) : '';
$threshold[] = 'quotes.approved = 1';