views:

36

answers:

0

One of the benefits of prepared statements, (really the only major one) is that SQL commands/triggers are sent in one request - and the user-data (or whatever you provide) is sent in another transfer. This transfer of the user-data (i.e. for an INSERT) is supposed to be in binary form so that PHP (and then the DB server) don't waste time converting the data to a string and back.

However, when using PDO I noticed that the PDOStatement::bingParam() method defaults to PDO::PARAM_STR when no option is given.

Does this mean that PDO throws the binary transfer out the window since it forces all non-ints and booleans (doubles, floats, and strings) to be strings?