I have a Python script that inserts data into a MySQL database, but to preserve the id values I want it so that if it finds the same name then it will just update the vuln_count column for that record.
I have the following MySQL insert code:
cur.execute("INSERT INTO vuln_sets (vulntype, displayname, bulletinfamily, vulncount)"
" values (%s,%s,%s,%s,)", [k, vuln_name, vuln_bulletinfamily, vuln_count], "ON DUPLICATE KEY UPDATE vulncount = values(%s)", [vuln_count])
But I have an error of execute() takes from 2 to 3 positional arguments but 5 were given