You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND tr.id_trasmissione = AND ch.id_canale = c.id_canale AND c.id_voce1=v.id_voc' at line 1