in reply to How do I find what column $dbh-{'insert_id'} was inserted into?

It looks to be experimental at this point, but have a look at the STATEMENT HANDLE ATTRIBUTE area in the DBI docs.

You could loop thru the results of $sth->{TYPE} and look for something with AUTO_UNIQUE_VALUE. (you would get the integer equiv to AUTO_UNIQUE_VALUE from the type_info* methods)

  • Comment on Re: How do I find what column $dbh-{'insert_id'} was inserted into?