in reply to Finding last added auto_increment id in mysql
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).$id = $dbh->selectrow_array('SELECT LAST_INSERT_ID()');
broquaint
|
|---|