kingram has asked for the wisdom of the Perl Monks concerning the following question:
When using DBI and the associated Database module, what is the best way to find out the final statement and contents reaching the database?
Particularly when you are passing values? E.G.Dumper just gives me:$sql="insert into test (one, two, three) VALUES (?,?,?)" @params = ('4','5',"str_to_date(\'$time_value\',\'%Y-%m-%d %h:%i:%s %p +\') $sth->prepare($sql); print Dumper($sth); my $rslt = $sth->execute($params[0],$params[1],$params[2]); print Dumper($rslt);
$VAR1 = bless( {}, 'DBI::st' ); $VAR1 = 1;Not sure how to make sense of the first response, or if I need to use a different tool. The 2nd response indicates a successful SQL operation, but the date_to_string function is failing to put the date into the record.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Dumper with DBI/DBD?
by marto (Cardinal) on Jul 30, 2012 at 08:47 UTC | |
by kingram (Acolyte) on Jul 30, 2012 at 09:11 UTC | |
by marto (Cardinal) on Jul 30, 2012 at 09:26 UTC | |
Re: Dumper with DBI/DBD?
by moritz (Cardinal) on Jul 30, 2012 at 10:04 UTC | |
Re: Dumper with DBI/DBD?
by mje (Curate) on Jul 30, 2012 at 09:37 UTC |
Back to
Seekers of Perl Wisdom