jeudi 30 avril 2015

Sqlite using Python3 error?

I am trying to insert some data into a sqlite database by following : -

param = '("593863695396044801","Ivan F. Siahaan","307783731","None","65","83","Thu Apr 30 19:45:13 +0000 2015","xyz")'

>>> conn.execute("INSERT INTO data "+param) Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
sqlite3.OperationalError: near ")": syntax error

I initialized connection to database as follows :-

from sqlite3 import dbapi2 as sqlite

conn = sqlite.connect('dataStore')

What wrong I am doing here ?

Aucun commentaire:

Enregistrer un commentaire