Se :FILTRO1 e' una costante dovresti passarla in php

codice:
$query = "select xxxx
     from xxx
     left join xxxx on yyyy=zzzz
     left join qqq on eeee=tttt
     where statoordine='INVIATO' 
     and utdanagrafica.RagSociale like if(" . :FILTRO1 ." = '', '%', '". :FILTRO1."')";