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.
$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);
Dumper just gives me:
$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.