You pass the SQL as the first argument to $dbh-do - no need to extract it from the error message.
Please also read What shortcuts can I use for linking to other information?
In reply to Re: getting the sql of a parameterised query
by moritz
in thread getting the sql of a parameterised query
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |