Ok I'm a bit stuck and a little confused (and not about the same thing

).
I basically followed Kevin's "select" and "update" queries to add the other options to be changed. However I'm a little confused why the "select" query selects
username and
userid when the "update" query doesn't use those variables.
Select query
Code:
$unsubscribe = $db->query_first("SELECT username, userid, email FROM ".TABLE_PREFIX."user WHERE email = '$esc_email' AND options &16");
Update query
Code:
$unsubscribe = $db->query("UPDATE ".TABLE_PREFIX."user SET options = options - 16 WHERE (options & 16) AND email= '" . $db->escape_string($email) . "'");
Now to the part I'm stuck on.... thread subscriptions. When I use my "select" query it triggers this if statment:
Code:
if (empty($unsubscribe['email']))
{
eval(standard_error(fetch_error('advanced_unsubscribe_link_error_unsubscribed', $vbulletin->options['contactuslink'])));
}
This is the select query
Code:
$unsubscribe = $db->query_first("SELECT * FROM ".TABLE_PREFIX."subscribethread WHERE userid = '$id' AND emailupdate = 1 OR 2 OR 3");
I have other issues with thread subscriptions, but I figure I should find out what's wrong with my select query first
Is it because the subscribethread table doesn't have an email column?