This happens because the plugin doesn't call the vBulletin database interaction methods but instead calls PHP's mysql_* library methods directly.
For example, mysql_query in vBulletin should be converted to $db->query_read, but it also depends on what the SQL query wants to do. An UPDATE query should be called using $db->query_write instead.
When I went to run that I got this error
Code:
Static analysis:
4 errors were found during analysis.
Unexpected character. (near "$" at position 0)
Unexpected beginning of statement. (near "$" at position 0)
Unexpected beginning of statement. (near "db" at position 1)
Unexpected beginning of statement. (near "query_write" at position 5)
SQL query:
$db->query_write
MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '$db->query_write' at line 1