Reputation: 31481
An informative-sounding blog post from 2006 states these facts about using native prepared statements in PDO:
How much of this is still true today?
Upvotes: 2
Views: 246
Reputation: 101936
No, this is not true if you are using a recent MySQL version. At least to the most part.
Prepared statements make use of the query cache since MySQL 5.1.17.
Nearly all SQL statements can be run as prepared statements. You can find a list in the MySQL docs. SHOW TABLES
in particular is not in that list, but in all honestly, have you ever used that SQL statement from PHP?
I don't know anything about that, but I'd assume that it is fixed.
Don't forget that the emulation of prepared statements is not encoding-safe and as such may (depending on the exact condition) still allow SQL injections.
Upvotes: 4
Reputation: 31740
Upvotes: 3