Keep in mind that retrieving the auto increment id needs to be the first thing you do after inserting the record. Also either exclude the primary key from the insert statement or pass NULL as its value.$new_id = $sth->{mysql_insertid};
Here's the MySQL documentation page: http://www.mysql.com/doc/en/Perl_DBI_Class.html
In reply to Re: Perl/DBI autoincrement
by abarilla
in thread Perl/DBI autoincrement
by Digitus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |