I'm not familiar with SQL(or python to be honest), and i was wondering how to add variables into tables. This is what i tried:
import sqlite3
conn = sqlite3.connect('TESTDB.db')
c = conn.cursor()
c.execute('''CREATE TABLE IF NOT EXISTS table(number real, txt text)''')
r=4
c.execute('''INSERT INTO table(r,'hello')''')
conn.commit()
conn.close()
This doesn't work.I get the error, "TypeError: 'str' object is not callable"How do i make the table insert the variable r??
Thanks