$query = $db->query_read("SELECT nick FROM denora.user WHERE hostname NOT LIKE 'localhost.net' AND hostname NOT LIKE '%mydomain.tld%' AND online = 'Y'"); if($db->num_rows($query)) { $chatters = ''; while($chatter = $db->fetch_array($query)) { $chatters .= $chatter['nick']; $chatters .= ', '; } }
$chatusers = substr_replace($chatters, '', -2);
Can you verify that the query is returning users? (Try executing in the AdminCP [> Maintenance > Execute SQL Query])