in reply to Finding last added auto_increment id in mysql

This approach may be a little filthy but it does the job fine and dandy -
$id = $dbh->selectrow_array('SELECT LAST_INSERT_ID()');
What's happening is it's using the awfully handy LAST_INSERT_ID() function in MySQL to get the id of the last autoincremented row, and selectrow_array() returns the value in the first row when called in a scalar context (we love, wantarray(), yes we do).
HTH

broquaint