Re: Sarge problems with MySQL and DBI / DBD::mysql
Oliver Elphick wrote:
>which returns 0 rows, works correctly in mysql. But when it is passed
>through this statement in Perl:
>
> my @row = $dbh->selectrow_array($sql) or
> &failed(__FILE__, __LINE__,
> "Failed to run the sql statement with error
> $DBI::errstr");
>
>How can I debug or fix this problem, please?
>
>
Instead of doing this, you might want to try setting RaiseError (see man
DBI) which would cause DBI to detect errors and throw exceptions.
Alternatively, you might want to use $h->err to check for errors.
- Adam
Reply to: