This is what I\'ve read so far about PDO::ATTR_EMULATE_PREPARES:
I'd recommend enabling real database PREPARE
calls as the emulation doesn't catch everything.., for example, it will prepare INSERT;
!
var_dump($dbh->prepare('INSERT;'));
$dbh->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
var_dump($dbh->prepare('INSERT;'));
The output
object(PDOStatement)#2 (1) {
["queryString"]=>
string(7) "INSERT;"
}
bool(false)
I'll gladly take a performance hit for code that actually works.
FWIW
PHP Version: PHP 5.4.9-4ubuntu2.4 (cli)
MySQL Version: 5.5.34-0ubuntu0