in reply to dbi error handling
select count(*) from table will always have at least one row: an empty table will give 0. (Of course, the table must exist, and the $dbh must be valid).
selectrow_array is just a convenience (it does a combined prepare + execute) for just this kind of SQL where you can be sure there will not be too many rows.
I'd say RaiseError => 1 is indeed the best and easiest way.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: dbi error handling
by runrig (Abbot) on Dec 21, 2010 at 17:02 UTC | |
by Anonymous Monk on Dec 22, 2010 at 03:31 UTC | |
by Anonymous Monk on Dec 22, 2010 at 04:01 UTC | |
by runrig (Abbot) on Dec 22, 2010 at 18:16 UTC |
In Section
Seekers of Perl Wisdom