In Python, after I INSERT Into mysqldb, how do I get the "id"?
- by alex
The primary key.
cursor.execute("INSERT INTO mytable(height) VALUES(%s)",(height))
My table has 2 columns:
id << primary, auto increment
height << this is the other column.
How do I get the "id", after I just inserted this?