I don't know how to get this to work with the new script. I've been trying since last night.
Code:
$query = "SELECT * FROM ".$GLOBALS['prefix']."tabs WHERE username = '".$GLOBALS['username']."'";
$result = runquery($query);
$num = mysql_numrows($result);