When I send Query:
SELECT * FROM tabela WHERE id_cliente = '$id_cliente' ORDER BY ano DESC
Duplicate values are returned, because there are duplicate values in the table. But I want to return only once every year contained in the table.
More unsuccessful when submitting the query's below:
SELECT * FROM tabela WHERE id_cliente = '$id_cliente' GROUP BY ano ORDER BY ano DESC
SELECT * FROM tabela WHERE id_cliente = '$id_cliente' ORDER BY ano DESC GROUP BY ano
Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in [...]
Tablestructure: here