For inserting into a table, the safe way is
c.execute("insert into table (?,?,?,...)",my_tuple)
But how does one create a table safely? I've tried something like this:
conn = sqlite3.connect(database)
c = conn.cursor()
cmd = "create table ? (? text,? text)"
my_tuple = ("my_table","first","second")
c.execute(cmd,my_tuple)
but I get errors like this:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
sqlite3.OperationalError: near "?": syntax error
Should I just assemble a string in python and throw it at sqlite to create the table?