in reply to Managing DBI Transactions
the getMaxID($dbh); sub just returns the max of an id column for each table that i'm inserting into.In that case, you're trying to use the same primary key more than once. You should increment the values.
Oh, yeah, and I basically see nothing wrong with your approach, except I'm wondering why you seem to be passing a reference to $dbh. A copy of an "object" (handle) is still the same object.
Well, that, and you should try to get a lock, use semaphores, something, to avoid a collision of doing two inserts at the same times.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Managing DBI Transactions
by Grygonos (Chaplain) on Mar 30, 2004 at 15:33 UTC |