摘要: python插入数据库内容后获取这条内容的主键(id)的值 cursor.execute("INSERT INTO test (nama) VALUES (%s)", name) #执行插入语句 print int(cursor.lastrowid)#直接查询到主键id print int(conn 阅读全文
posted @ 2017-06-12 18:01 叶小凡 阅读(260) 评论(0) 推荐(1)