It works, but it prints the error twice, not sure why.
Turn off PrintError
Won't statements with placeholders (such as SELECT * FROM Table WHERE id = ?) result in a verdict of invalid? Your tool would tell me just about every statement I write is invalid. It discourages best practices.
You shouldn't use a variable for two different purposes. Use a different variable other than $sth to hold the result. There's no reason $sth should even exist outside the eval.
In reply to Re: validating SQL using DBI
by ikegami
in thread validating SQL using DBI
by sflitman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |