HTML Code:
$attq = $vbulletin->db->query_read("SELECT
SUM(counter) as sum_att_views
FROM " . TABLE_PREFIX . "flashchat_connections
WHERE userid=".$user['userid']);
if ($vbulletin->db->num_rows($attq) > 0)
{
$att = $vbulletin->db->fetch_array($attq);
$xperience['count_misc_cdp'] = $att['sum_att_views'] * $vbulletin->options['xperience_points_cdp'];
$xperience['count_misc'] += $xperience['count_misc_cdp'];
$additionalsql .= "points_misc_cdp=".$xperience['count_misc_cdp'].","
Is this the main bulk of code to edit?