W prepared statement nie trzeba się bawić w filtrowanie znaków, bo zajmuje się tym (z reguły) sterownik. Ewentualnie przy prepared statementach filtrowanie może być w ogóle niepotrzebne, gdyż sterownik może używać oddzielnego formatu zapytań. Oprócz tego gratis może jeszcze być np typowanie czy zwiększona wydajność gdy używa się jednego prepared statement wielokrotnie (zależy od sterownika).
Jest o tym zresztą w przytoczonym artykule na Wikipedii:
As compared to executing SQL statements directly, prepared statements offer two main advantages:[1]
The overhead of compiling and optimizing the statement is incurred only once, although the statement is executed multiple times. Not all optimization can be performed at the time the prepared statement is compiled, for two reasons: the best plan may depend on the specific values of the parameters, and the best plan may change as tables and indexes change over time.[2]
Prepared statements are resilient against SQL injection, because parameter values, which are transmitted later using a different protocol, need not be correctly escaped. If the original statement template is not derived from external input, SQL injection cannot occur.
(...)
A number of programming languages support prepared statements in their standard libraries and will emulate them on the client side even if the underlying DBMS does not support them, including Java's JDBC,[12] Perl's DBI,[13] and PHP's PDO.[1] Client-side emulation can be faster for queries which are executed only once, by reducing the number of round trips to the server, but is usually slower for queries executed many times. It resists SQL injection attacks equally effectively.[1]
Mam przeklejać Wikipedię czy co?