Do you mean from php script? check PHP: $user = $db->get_user($member_id);if($user[is_affiliate]>0) "user is affiliate";