print"ID of last record is ", int(cursor.lastrowid) #最后插入行的主键ID
print"ID of inserted record is ", int(conn.insert_id()) #最新插入行的主键ID,conn.insert_id()一定要在conn.commit()之前,否则会返回0
2021-10-08 13:13:46
print"ID of last record is ", int(cursor.lastrowid) #最后插入行的主键ID
print"ID of inserted record is ", int(conn.insert_id()) #最新插入行的主键ID,conn.insert_id()一定要在conn.commit()之前,否则会返回0
下一篇:sql语句查询重复的数据