PDO::ATTR_EMULATE_PREPARES => false
- by user264058
I'm new to php and PDO ,so i read this response to a similar post-
Does PDO really not use prepared statements with mysql?
Yes, by default (at least with version I tested) but native mode can be turned on manually.
If not, can it be forced to do so
By employing PDO::ATTR_EMULATE_PREPARES setting, the name is pretty self-explanatory.
$dbh-setAttribute( PDO::ATTR_EMULATE_PREPARES, false );
should you do that?
That's hardest question of them all.
Well, I'd say - yes, you should. If you choose PDO as your db driver, there is no point in using it in the emulation mode. by YOUR COMMON SENSE
Aren't prepared statements secure from SQL injection, why change if from 'true'-false?? what is native mode??