in reply to Re: Creating Dynamic SQL statements using arrays
in thread Creating Dynamic SQL statements using arrays

This only applies to certain DBMS's. Oracle definitely pre-parses. MySQL definitely does not, nor does Postgres. Sybase probably does. However ,the other reason to use placeholders is to protect yourself from attacks. If you just blindly go using user-provided input, you better make sure to call $dbh->quote on every piece. Or you could use placeholders and let the DBD::* driver do the work for you. Plus if you ever switch from MySQL to Oracle, your SQL will immediately have a performance advantage over not using placeholders.
  • Comment on Re: Re: Creating Dynamic SQL statements using arrays