The result from the code echo's a whos online page where logged in members are displayed on.
I need info from multiple tables but when i use select distinct and a member logs in twice it still echo's him 2 times in my list.
What changes can be made to only show the user once ??
$strsql="SELECT distinct u.userid, m.id as member_id, m.login, m.age, m.gender, c.name as country, l.name as language, v.name as state, p.id, p.looking_for, p.age_from, p.age_to, u.timestamp, p.lastlogin FROM dt_usersonline u ,dt_members m ,dt_profile p ,dt_countries c ,dt_states v, dt_languages l
WHERE u.userid=p.member_id AND u.userid=m.id AND p.state=v.id AND p.country=c.id AND p.lang_1=l.id AND p.status='1' AND (u.login <> '')and(u.timestamp>$timeout)";
Thanks,
Marc