Topic: Block admin group from showing in latest_visitors
I have added m.member_group_id!='1' to the DB query for the latest_visitors extension but it is not doing what I thought it would. I am trying to have everybody in group one hidden from the scrip output.
Help getting this to working would be appreciated.
Below is the code that is not working:
{
$result = $DB->query("SELECT m.*, d.*
FROM " . DB_PREFIX . "members AS m, " . DB_PREFIX . "members_data AS d, " . DB_PREFIX . "visitors AS v
WHERE v.member_id=" . intval($member_id) . " AND m.member_group_id!='1' AND v.visitor_id=m.member_id AND m.member_id=d.data_id AND m.active='1' $gender $picturesonly
ORDER BY v.visitdate DESC
LIMIT " . intval($max));
}
else
{
$result = $DB->query("SELECT m.*, d.*
FROM " . DB_PREFIX . "members AS m, " . DB_PREFIX . "members_data AS d
WHERE m.member_id=d.data_id AND m.member_group_id!='1' AND m.active='1' $gender $picturesonly
ORDER BY m.lastvisit DESC
LIMIT " . intval($max));
}Last edited by geoff (2007-07-26 21:18:41)