hi sir,
Thanks for your reply...
linedata = {'time':data[1], 'date':data[9],'latitude':latitude,'longitude':longitude,'speed':data[7]}
try:
#Execute the SQL command
cursor.execute("""INSERT INTO gps VALUES (%(id)d, %(time)s, %(date)s, %(latitude)s,%(longitude)s,%(speed)s)""", linedata)
Now tha script not inserting the data to mysql,
its giving below error:
Traceback (most recent call last):
File "./2read.py", line 29, in <module>
cursor.execute("""INSERT INTO gps VALUES (%(id)d,%(time)s, %(date)s, %(latitude)s,%(longitude)s,%(speed)s)""", linedata)
File "/var/lib/python-support/python2.5/MySQLdb/cursors.py", line 151, in execute
query = query % db.literal(args)
KeyError: 'id'
-------
Id is a column with autoincrement , Not null and it is primary key...
I came to know error is at id, incursor.execute...if i want to insert column woih auto increment...what i have to do.
I l registered with my another email id...but i didnt get any activation key...si i couldnt activate it...today i changed my email id and activated...
thanks,
sravan