SELECT group_concat(DISTINCT t1.p01, ', ', t1.nr01, ':', t1.p19 SEPARATOR '##' ) as msg

FROM
(

select d00.nr01 as nr01,
       d00.p19 as p19,
       d64.p01 as p01
FROM d64
LEFT JOIN d00 ON d00.nr01=d64.p00
WHERE d64.p01 IN ('{np_tel1}', '{np_tel2}', '{np_tel3}')
   && d64.p01<>''

UNION ALL

select d00.nr01 as nr01,
       d00.p19 as p19,
       d65.p01 as p01
FROM d65
LEFT JOIN d00 ON d00.nr01=d65.p00
WHERE d65.p01='{np_mail}'
   && d65.p01<>''

) as t1

GROUP BY NULL;