in reply to validating SQL using DBI
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: validating SQL using DBI
by sflitman (Hermit) on Jun 29, 2009 at 02:02 UTC |