in reply to Perl/DBI autoincrement
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Perl/DBI autoincrement
by Digitus (Novice) on Jul 18, 2003 at 13:16 UTC |