in reply to DBI - Get prepared/populated sql statement
According to DBI, you can recover the statement passed to your prepare statement either through the statement handle or the database handle, by invoking the statement attribute. In your code, this could be done with:
my $sth = $dbh->prepare(<<EOQ); select tbl.column1, tbl2.column2 from tbl1, tbl2 where condition = ? EOQ print $sth->{statement};
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: DBI - Get prepared/populated sql statement
by mhearse (Chaplain) on Mar 10, 2009 at 16:36 UTC | |
by mje (Curate) on Mar 11, 2009 at 12:02 UTC |