in reply to Simpler DBI::MySQL queries

($sth = $dbh->prepare( "something" ))->execute(); my $val= $sth->fetchrow_array();
I've no doubt a true perlmeister could find better (and I'll take a slap for removing your error handling).

Replies are listed 'Best First'.
Re^2: Simpler DBI::MySQL queries
by Mutant (Priest) on Dec 01, 2004 at 10:00 UTC

    I'll let you off that slap if you set RaiseError to true. :)

    If you're doing more than a couple of calls to DBI, it's usually better to have this turned on, and wrap something at a high level in an eval{}.