Welcome to the Monastery | |
PerlMonks |
Re: How can I make DBI's prepare() fail? [MySQL]by kschwab (Vicar) |
on Dec 23, 2018 at 16:32 UTC ( [id://1227643]=note: print w/replies, xml ) | Need Help?? |
You can make it fail if you enable server-side prepare:
Then, try to prepare some invalid SQL. I used $sth->prepare("? WHEE") and got this: DBD::mysql::db prepare failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? WHEE' at line 1 at test.pl line 9. prepare failed at test.pl line 11.
In Section
Seekers of Perl Wisdom
|
|