- Selecting single rows
my $last_id = $dbh->selectall_arrayref( 'SELECT id FROM person WHERE name=?', undef, 'martyn', )->[0][0];
- should have been ...
my $last_id = $dbh->selectrow_array( 'SELECT id FROM person WHERE name=?', undef, 'martyn', );
my $last_id = $dbh->selectall_arrayref( 'SELECT id FROM person WHERE name=?', undef, 'martyn', )->[0][0];
my $last_id = $dbh->selectrow_array( 'SELECT id FROM person WHERE name=?', undef, 'martyn', );