0
Can anyone tell me why this SELECT
down in the MYSQL
is getting the biggest ID
correctly, but the fields (value, date and status) do not bring the information of the largest ID
returned. The SELECT
is getting the biggest ID
, but the information of the fields (valor
, data
and status
) returned are from another ID
.
SELECT max(id), valor, afiliado_id, data, status FROM afiliado_saque_logs WHERE afiliado_id = 27
And when I do the way down by putting the (afiliado_id = 27
) concerning the person I want to bring the greatest ID
with the fields (valor
, data
, status
) there returns nothing, and there is information for the afiliado_id = 27
.
SELECT id, valor, afiliado_id, data, statusFROM afiliado_saque_logsWHERE id = (SELECT MAX(id) FROM afiliado_saque_logs) and afiliado_id = 27