--------------------------------------------------------------------------------
I am trying to get the last occurance of a display name in a login user log database. Basically I have a table that looks like this:
id user fname lname
-----------------------------------
1 jdoe Jane Doe
2 jdoe John Doe
3 jdoe Fred Flinstone
I run the MySQL query: SELECT name, max(id) as max_id, user FROM `logins` GROUP BY user
I get back:
id user fname lname
-----------------------------------
3 jdoe Jane Doe
I actually want:
id user fname lname
-----------------------------------
3 jdoe Fred Flinstone
Any that can help it would be greatly Appreciated!!