are you sure the query is reached?
also surely posting with usergroup 2?
take out the seond query and instead of the first one try this:
PHP Code:
$DB_site->query("UPDATE user SET " .
iif($forumid == 19 and !$bbuserinfo['userid'] == $threadinfo['postuserid']), iif($bbuserinfo['rating'] >= 18 and $bbuserinfo['usergroupid'] == 2, "usergroupid=10,", "") . "rating=rating+2,", "") .
$dotitle . "lastpost='".time()."' WHERE userid='$bbuserinfo[userid]'");