I have a table in mysql and I need to return unique values from this table, but I am not able to create a function or query that suits. The SQL statement in the database would be like this and it works fine, but in Doctrine I can not do:
SELECT DISTINCT anodecorrente FROM ct_noticias WHERE categoria = 'Infanto' ORDER BY nt_id ASC
I have the class that maps the table in Doctrine
to CtNoticias
.