Welcome to the Monastery | |
PerlMonks |
Re: DBI insert: Need to retrieve an autoincremented column from a table after an insert.by injunjoel (Priest) |
on Aug 10, 2008 at 02:52 UTC ( [id://703367]=note: print w/replies, xml ) | Need Help?? |
Greetings, One idea, though probably not the most efficient, would be to create two prepared statements, one for insert and another for query. Seems like overkill but at least you can trust the results. Basically a "Read it back to me" strategy. Not sure how much load this will add to things but since the statements are prepared you get all of those benefits. You can also use the select statement as a pre-check to see if the data is already in the DB. Just a thought... -InjunJoel
"I do not feel obliged to believe that the same God who endowed us with sense, reason and intellect has intended us to forego their use." -Galileo
In Section
Seekers of Perl Wisdom
|
|