Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13921

python sqlite3 UPDATE set from variables

$
0
0

I made next Query to update a row in my DB.

def saveData(title, LL, LR, RL, RR, distanceBack):    c.execute("UPDATE settings SET (?,?,?,?,?,?) WHERE name=?",(title, LL, LR, RL, RR, distanceBack, title))    conn.commit()

I always get next error: sqlite3.OperationalError: near "(": syntax errorI know something isn't correct with the question marks. I can't find out what the exact solution is. Can somebody explain me what the problem is?


Viewing all articles
Browse latest Browse all 13921

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>