fetchNum('SELECT id FROM co_righe_documenti WHERE um='.prepare($record['valore']).'
UNION SELECT id FROM dt_righe_ddt WHERE um='.prepare($record['valore']).'
UNION SELECT id FROM or_righe_ordini WHERE um='.prepare($record['valore']).'
UNION SELECT id FROM co_righe_contratti WHERE um='.prepare($record['valore']).'
UNION SELECT id FROM mg_articoli WHERE um='.prepare($record['valore']).'
UNION SELECT id FROM co_righe_preventivi WHERE um='.prepare($record['valore']));
if (!empty($righe)) {
echo '
'.tr('Ci sono _NUM_ righe collegate', [
'_NUM_' => count($righe),
]).'.