fetchArray('SELECT id FROM dt_ddt WHERE idporto='.prepare($id_record).'
UNION SELECT id FROM co_documenti WHERE idporto='.prepare($id_record).'
UNION SELECT id FROM co_preventivi WHERE idporto='.prepare($id_record));
echo '
'.tr('Ci sono _NUM_ documenti collegati', [
'_NUM_' => count($documenti),
]).'.