08-17-2013, 09:35 PM
A dirty way to get this would be
SELECT a_nick, a_user_index
FROM newproject_db.t_characters c
WHERE a_user_index IN
(
SELECT a_portal_index
FROM newproject_auth.t_users
WHERE a_zone_num != -1
)
AND a_index =
(
SELECT a_index
FROM newproject_db.t_characters
WHERE a_user_index = c.a_user_index
ORDER BY a_datestamp DESC
LIMIT 1
)
GROUP BY a_user_index
But its not really efficient and if u would use this query live and not cachedthen someone could harm your mysql server spam loading this page

