J'exécute une instruction INSERT INTOComment obtenir le "id" après INSERT dans la base de données MySQL avec Python?
cursor.execute("INSERT INTO mytable(height) VALUES(%s)",(height))
et je veux obtenir la clé primaire.
Ma table a 2 colonnes:
id primary, auto increment
height this is the other column.
Comment puis-je obtenir le "id", après que je vient d'être inséré cela?
http://stackoverflow.com/questions/706755/how-do-you-safely-and-efficiently-get-the-row-id-after-an-insert-with-mysql-usin – pmav99