fetchNum('SELECT id FROM dt_ddt WHERE idcausalet='.prepare($id_record).'
UNION SELECT id FROM co_documenti WHERE idcausalet='.prepare($id_record));
if (!empty($documenti)){
echo '
'.tr('Ci sono _NUM_ documenti collegati', [
'_NUM_' => count($documenti),
]).'.