| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Andre Matos | Date: | January 18 2005 12:06am |
| Subject: | Rollback and INSERT_ID() or LAST_INSERT_ID() | ||
| View as plain text | |||
Hi List, I have a field in one of my tables that uses auto-increment from MySQL 4.1.8-nt (Windows XP). My problem is to get the last insert ID when the insert fails and I use rollback. The MySQL is still incrementing the field. How can I avoid this if it is possible? I am trying to avoid to use the function MAX() to get the last ID inserted. Thanks for any help. Andre -- Andre Matos amatos@stripped
| Thread | ||
|---|---|---|
| • Rollback and INSERT_ID() or LAST_INSERT_ID() | Andre Matos | 18 Jan |
| • Re: Rollback and INSERT_ID() or LAST_INSERT_ID() | Eric Bergen | 18 Jan |
| • Re: Rollback and INSERT_ID() or LAST_INSERT_ID() | Andre Matos | 18 Jan |
| • Re: Rollback and INSERT_ID() or LAST_INSERT_ID() | Paul DuBois | 18 Jan |
| • Re: Rollback and INSERT_ID() or LAST_INSERT_ID() | Andre Matos | 18 Jan |
| • Re: Rollback and INSERT_ID() or LAST_INSERT_ID() | Joerg Bruehe | 18 Jan |
| • Re: Rollback and INSERT_ID() or LAST_INSERT_ID() | Clint Edwards | 18 Jan |
