in reply to Re: DBI Parameter Security
in thread DBI Parameter Security

The extra quotes will prevent the question mark from being seen as a placeholder at all. Instead, the statement would search for rows where the column bar contains the literal string '?'. Except that you would get an error when you called execute($baz), because the SQL statement is expecting zero bind parameters and you gave it one bind parameter.

As lhoward said, using placeholders is perfectly safe, because any data that the user enters will simply be passed to the database as a literal string.

This is similar to putting user data in a regex with \Q; /\Q$user_data/ is perfectly safe because all the metacharacters will be escaped.