Deviloper wrote:
Hello,
I am using DBI and relativly new to it.
I get a lot of error messages like
[Wed Jan 10 05:16:44 2009] DB-INSERT.pl: DBD::mysql::st execute failed: You
have an error in your SQL syntax; check the manual that corresponds to your
MySQL server version for the right syntax to use near '44522 ','Bonn
at /usr/local/adm/
DB-INSERT.pl line 123.
(Its not my code but sadly I have to do the maintenance.)
I guess its a quoting error, thats not the problem. but I want DBI and/or SQL
die give me the whole Line where the syntax-error occurd not just a useless
snip.
Ok, I could log in case of error by myself. But don“t know how to bring perl to only
"onetime" interpolating the query.
Any comments?
Thanks,B.
I think DBIx::Log4perl could be just what you are looking for -
http://search.cpan.org/~mjevans/DBIx-Log4perl-0.13/lib/DBIx/Log4perl.pm
Easily added to an existing app and it will by default show DBI method
calls, all the SQL and extensive info when an error occurs but can be
changed to show info.
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com