D
D
demortall2022-02-11 18:48:41
PostgreSQL
demortall, 2022-02-11 18:48:41

Psycopg2.errors.SyntaxError: syntax error at or near "user"?

cursor.execute("INSERT INTO domains (user, domain, time, ns1, ns2, tc, cloudflare, cloudid) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)",[login, json["domain"], strftime('%Y-%m-%d %H:%M'), ns1, ns2, session['id'], cloud[1], cloudid])

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2022-02-11
@demortall

user is a reserved word in PostgreSQL.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question