OK, very sorry about this but it looks like a bug was introduced in VB 4.1.4 where they accidentally re-used the same variable for new query causing this database error.
Currently affected versions are VB 4.1.4 - 4.1.7 and even though it's not out yet, 4.1.8 will probably have it too.
To fix the problem you will have to manually edit your file:
online.php
Find the code (around line 277- may vary by version):
PHP Code:
//VBIV-5766 get the count of members and guests online.
$userscount = $db->query_read_slave("
SELECT IF(userid > 0, 1, 0) as isuser, COUNT(session.userid) as online_users
$hook_query_fields
FROM " . TABLE_PREFIX . "session as session
$hook_query_joins
WHERE session.lastactivity > $datecut
". iif(!$showmembers, " AND session.userid < 1", "") ."
$hook_query_where
$where
GROUP BY isuser
");
and delete the line $hook_query_fields so you make it:
PHP Code:
//VBIV-5766 get the count of members and guests online.
$userscount = $db->query_read_slave("
SELECT IF(userid > 0, 1, 0) as isuser, COUNT(session.userid) as online_users
FROM " . TABLE_PREFIX . "session as session
$hook_query_joins
WHERE session.lastactivity > $datecut
". iif(!$showmembers, " AND session.userid < 1", "") ."
$hook_query_where
$where
GROUP BY isuser
");
And save and upload the fixed file. (Save a backup of the original of course.)
This will fix the database error on who's online.
I realize it is a pain to do a manual file edit so I release an update soon that will give you the option to disable display on who's online so you don't have to worry about the file edit.
Just to reiterate- VB versions below 4.1.4 are not affected by this bug.