im using DBI in Perl to connect to my PostgreSQL database. Everything works fine, but in my debugging (print results, etc.) Iam cannot check if the perls DBI module is actually programmed.
I have something like this:
$sth->prepare( qq{SELECT * FROM company WHERE companyname LIKE ? AND city = ?}); $sth->execute( $name.'%', $city);
I canβt see what the sql query looks like after calling execute, because execution is the last step that parameters are bound to the query.
I would like to have something like $sth->getLastExecutedQuery() or something to see what the query looks like.
In this case, the getLastExecutedQuery() function will return:
SELECT * FROM company WHERE companyname LIKE 'Company Name%' AND city = 'City name';
Is there any way to get this? Its just for debugging purposes.
NovumCoder
source share