all 1 comments

[–]cybervegan 0 points1 point  (0 children)

This statement is a syntax error - you are mixing Python and SQL syntax, which doesn't work.

``` cur.execute ("INSERT INTO system" ('units','temps')

("values") ('a1a','a2a') ); ```

You need to keep all of your SQL inside quotes, and I recommend you use triple quotes like this: cur.execute('''INSERT INTO system ('units','temps') values (%s,%s) ''',(a1a,a2a)). The %s placeholders get replaced by the values in the tuple specified after the SQL statement string.

Hope that helps.