[PHP] Get a list of online characters
#3

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



Messages In This Thread
[No subject] - by Paramount - 08-17-2013, 03:32 PM
[No subject] - by Sutz - 08-17-2013, 09:20 PM
[No subject] - by Wizatek - 08-17-2013, 09:35 PM
[No subject] - by Paramount - 08-17-2013, 09:51 PM
[No subject] - by Sutz - 08-17-2013, 09:53 PM
[No subject] - by Johnny5 - 08-17-2013, 09:54 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)