Hi,
I'm trying to create a custom "whos online" query with phpbb and the following query lists duplicates of the username:
$qry = mysql_query($sql = "SELECT DISTINCT(u.username), u.user_id, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_time FROM phpbb_users u, phpbb_sessions s WHERE u.user_id = s.session_user_id AND u.username != '$anony' ORDER BY u.username ASC");
...will return:
Andy
Andy
Andy
Anthony
Anthony
Bill........
Any thoughts on what I'm doing wrong? I also tried it w/o the parenthesis around u.username
Thanks alot. 🙂