$pollida = $pollinfo['pollid']; $posthreadid = $vbulletin->db->query_first(" SELECT threadid FROM " . TABLE_PREFIX . "thread WHERE pollid = '".$pollida."' "); $checkpost = $vbulletin->db->query_read(" SELECT username FROM " . TABLE_PREFIX . "post WHERE threadid = ".$posthreadid['threadid']." "); while ($posts = $vbulletin->db->fetch_array($checkpost)){if ($posts['username'] != $vbulletin->userinfo['username']){standard_error(fetch_error('bs_postfirst'));} }