If you haven't modified anything, then it should work, what version of MySQL do you have?
This error means that the select count query returned an error.
You can try bypassing it, but I strongly recommend that you find out why is this error appearing, or you might find yourself in trouble elsewhere.
To bypass it, edit the mentioned file and instead of:
// Get number of current visitors
$result = $db->query('SELECT COUNT(user_id) FROM '.$db->prefix.'online') or error('Unable to fetch online count', __FILE__, __LINE__, $db->error());
$num_online = $db->result($result, 0);
write:
// Get number of current visitors
//$result = $db->query('SELECT COUNT(user_id) FROM '.$db->prefix.'online') or error('Unable to fetch online count', __FILE__, __LINE__, $db->error());
$num_online = 0;
I'm not sure, even if there's no visitor there, you should be able to retrieve it. Are all tables there? Chech if there's any kind of problem with the (prefix)online table.