You should be using $vbulletin->db... to access queries, data, and the like... try this code:
PHP Code:
<?php
global $vbulletin;
require_once('includes/class_paid_subscription.php');
$susers = $vbulletin->db->query_read_slave("
SELECT *
FROM " . TABLE_PREFIX . "subscriptionlog
WHERE status = 1
AND userid = " . $vbulletin->userinfo['userid']
);
$isPremium = $vbulletin->db->num_rows($susers);
if ($isPremium != 0){
$st = '1';
}else{
$st = '0';
}
echo $st;
?>